[Tutor] Here is my program that I made

Isr Gish isrgish at fastem.com
Mon Aug 23 20:25:45 CEST 2004


Hi Kevin,

Whell here again we have a simmelar problem that I mentioned in a previouse post.
When you run the main module it gives you a choice in a loop to either play the game or quit. Now when you select to play, it is still in the loop even after we play. That islbecause there is nothing to break the loop, only if we select 2 for Exit, thats when we break from the loop. Now later in the defines module in the game itself we again use a loop, that we don't break out of only when we select not to play. Then we go and call YesNo for ever game whichbruns the loop again therefore for as meny times that we do replay the game thats how meny times we have to answer no to the loop to get out of it.
I hope I was clear with this, if you have any more questions feel free to ask

All the best,
Isr


-----Original Message-----
   >From: "Kevin"<python_newbie at vedorian.com>
   >Sent: 8/22/04 4:14:47 PM
   >To: "tutor at python.org"<tutor at python.org>
   >Subject: [Tutor] Here is my program that I made
   >
   >Ok I have attached the two files that go together. There are two 
   >problems that I can't figure out. One when you start the program it will 
   >ask you to enter  choice. When you enter a letter it will rais the 
   >exception error, but if you enter a number other then 1 or 2 it will 
   >just keep asking to make  choice. The second problem is when you go 
   >though the game when you guess the right number it will ask if you want 
   >to play again, so you need to enter y or n if you enter y you will start 
   >to play again if you enter n it will say thank you for playing then ask 
   >would you like to play again if you hit anything it will just keep 
   >asking you if you would like to play again. Any suggestions on how to 
   >fix that?
   >
   >Thanks
   >Kevin



More information about the Tutor mailing list