View Single Post
Old Jan 25th, 2008, 9:31 AM   #47
Chuckiferd
Programmer
 
Join Date: Nov 2007
Posts: 64
Rep Power: 1 Chuckiferd is on a distinguished road
Re: My pyguessinggame

Yes I dubugged that and several other gramatical errors in the print statements. I am comming up with a way to confront the entering of strings, which cause the program to crash. I will try experimenting, however I believe all I need is a command to get back into the while loop from the if loop. of course I could copy the while and if loop over and over, but I know that would not be the prefered method.

I have tried
if guess == answer:
      print 'congratualtions, that took', guessnum, 'tries.'
      print
      a=raw_input('type in refresh to continue, or hit enter to quit')
      elif a='refresh':
         start()

but the game doesn't care for that too much and just closes.
__________________
There are 10 kinds of people in this world, those who can read binary and those who can't.
Chuckiferd is offline   Reply With Quote