Как решить ошибку takes 0 positional arguments but 1 was given?

Попытался сделать камень ножницы бумагу через Tkinter:`from tkinter import*

import random as rdm

root = Tk()


def labbe():
    l1=Label(root,text=(f"Побед:{win}"),font='Times 12').place(x=10,y=10)
    l2=Label(root,text=(f"Ничьи:{nothing}"),font='Times 12').place(x=10,y=30)
    l3=Label(root,text=(f"Пройгрыши:{lose}"),font='Times 12').place(x=10,y=50)
    l4=Label(root,text='Играем!',font='Times 19 bold').place(x=200,y=50)    

b1=Button(root,text='Камень',height=2,width=10,font='Times 13',command=lambda: buttonClick('1')).place( x=40,y=140)
b2=Button(root,text='Ножницы',height=2,width=10,font='Times 13',command=lambda: buttonClick('2')).place( x=150,y=140)
b3=Button(root,text='Бумага',height=2,width=10,font='Times 13',command=lambda: buttonClick(3)).place( x=260,y=140)

comp_choise=rdm.randint(1,3)
lose =0
win =0
nothing=0
def buttonClick():
    if b1==comp_choise or b2==comp_choise or b3==comp_choise:
        global nothing
        nothing=nothing+1      
    elif (comp_choise==3 and b1) or (comp_choise==2 and b3) or (comp_choise==1 and b2):
        global lose
        lose=lose+1
    else:
        global win
        win=win+1
    

        
root.title('Камень,ножницы,бумага')
labbe()
root.geometry('400x200')
buttonClick()
root.resizable(False, False)
root.mainloop()`

Как сделать чтоб кнопка выдавала число в buttonCkick()?


Ответы (0 шт):