Skip to content
Advertisement

python tkinter “in” operator doesn’t work

my problem is the programme won’t state the answer as correct only if you put the answer alone, but i want to make that you can actually put a phrase in the entry widget and if the answer is in that phrase it would say correct, i made this work without tkinter but i canno’t make it work in tkinter here is my code, could you please help, thanks.

the code

JavaScript

Advertisement

Answer

I had to flip this if statment from this :

JavaScript

to this:

JavaScript

Thanks to @justin ezequiel for the solution and @random davis for a debugging tip

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement