Python Forum

Full Version: Need Help debugging program
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(Dec-19-2016, 09:48 PM)nilamo Wrote: [ -> ]Ok, try changing it to while not gameIsDone:.

I dont have gameIsDone defined, how do i define it
before loop (PEP8):
game_is_done = False

while not game_is_done:
    ...
    # when ready to exit from loop add
    game_is_done = True
(Dec-21-2016, 06:48 PM)ToastyCoder Wrote: [ -> ]
(Dec-19-2016, 09:48 PM)nilamo Wrote: [ -> ]Ok, try changing it to while not gameIsDone:.

I dont have gameIsDone defined, how do i define it

Did you change your code a lot?  Because you definitely did already have it defined, AND changed it's value in at least one place:

Quote:
GoodShots = getRandomNo(Kills)
gameisDone = False
 
while True:
    displayBoard(BunkerPics , ShotsMissed , ShotsHit , GoodShots)
Pages: 1 2