r/PythonLearning • u/Minute_Journalist593 • Sep 07 '25
Guess game
Guy's i have tried this i know it needs lot of improvement like handing exceptional error but i have applied what i have learned till date and i wanted it to make it by using def but i was getting confused so i decided to make it this way pls rate this and suggest me where do i need to improve
225
Upvotes
1
u/Spare-Plum Sep 07 '25
pretty neat!
As it currently stands, every single time it'll ask you if you want to play, you get one guess, and then it restarts.
Here's some suggestions for improvements:
Allow the user to guess until they get the right number. When they get the right number, then you reset
Bonus: tell the user if the number is higher or lower than your guess
Rather than asking every single time if they want to play, why not just exit whenever the user types "exit".
Here's an example run: