I am trying to make a number guesser but so far its not been working out, the code I have is
`def c1():
mtext = ment.get()
mlabel2 = Label(mGui, text=mtext).pack()
if mlabel2 == number1:
print ( "gj you got it" )
return
number1 = random.randrange(0, 101, 2) mbutton = Button(mGui, text = "check", command = c1).pack()
textbox = Entry(mGui, textvariable=ment)
so my question is, how do I make it print the text when you enter the right number in the textbox?
Aucun commentaire:
Enregistrer un commentaire