What's wrong with my code?


I'm writing a progrom that randomly selects a number and allows the player to guess it as many times as they want.And they can quit the game by typing 0.However my program only allows the player to guess one time and the player cant quit by typing 0.Whats wrong with my code?

Replace this line with your code.


There are a few ways to go about this, but I personally would use a while loop inside of the playGuessingGame() function that said

while guess != number:

and include all of the rest of that function inside of it. This might not be the best way to do it, but I just wanted to give you a little bit of inspiration. I know that it's hard and you can get coder's block while doing it for a while.
It's likely that other people might come with better solutions though.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.