How to fix Python restarting whenever I start program on IDLE environment?

When I run your program I get this output:

Python 3.2.5 (default, May 15 2013, 23:06:03) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
You haven't guessed the right amount of times or u won.

This is perfectly fine and expected.

I would modify your program this way:

while not (no_of_guesses == 11 or winning_conditon == 1)

while not would be the equivalent of until.

Leave a Comment