The Number Guessing Game is an interactive Python-based program where users attempt to guess a randomly selected number between 1 and 100. It’s a classic beginner-friendly project designed to reinforce core programming concepts while keeping things fun and engaging.

  • Random Number Generation: Uses Python’s random.randint() to generate a hidden target number.
  • Input Handling: Takes user guesses via input(), converting to integer for comparison.
  • Feedback Loop: Provides real-time guidance — whether the guess is too high, too low, or correct.
  • Error Management: Gracefully handles invalid inputs using try-except blocks.
  • Attempt Tracker: Counts and displays the number of guesses made before winning.

Built With

Share this project:

Updates