Build a command-line number guessing game where the computer picks a random number and the player tries to guess it. The game should provide hints like βToo high!β or βToo low!β after each guess.
while loopsif/elif/else conditionalsrandom moduletry/except error handlinginput() functionπ― Welcome to the Number Guessing Game!
I'm thinking of a number between 1 and 100...
Enter your guess: 50
π Too low! Try again.
Enter your guess: 75
π Too high! Try again.
Enter your guess: 63
π Congratulations! You guessed it in 3 attempts!
Play again? (yes/no): no
Thanks for playing! Goodbye! π
cd projects/01_number_guessing_game
python solution.py