from Tkinter import *
import random
root = Tk()
paper = 1
scissors = 2
rock = 0
computer = random.randint(0, 2)
def myScissors():
if computer == 2:
print("scissors")
myLabel = Label(root, text="Tie!")
myLabel.pack()
return
def myPaper():
if computer == 1:
print("Tie!")
myLabel = Label(root, text="Tie!")
myLabel.pack()
def myRock():
if computer == 0:
print("Tie!")
myLabel = Label(root, text="Tie!")
myLabel.pack()
return
mySpace = Label(root, text=" ", padx=50)
myButton = Button(root, text="rock", padx=50,command=myRock())
myButton1 = Button(root, text="paper", padx=50, command=myPaper())
myButton2 = Button(root, text="scissors", padx=50, command=myScissors())
myButton2.pack()
myButton1.pack()
myButton.pack()
mySpace.pack()
root.mainloop()
not finished but at the moment it should appear the label Tie when you click one of the buttons but instead it just appears, without clicking the buttons i dont know why this happens if somone replies, please tell my why it happens