
Description:
Guess the Number is a fun mini project built with Python where the computer randomly selects a number within a certain range, and the player has to guess it. After each guess, the program provides hints — telling the player whether their guess is too high, too low, or correct. The game continues until the player finds the right number.
Features:
The computer generates a random number within a chosen range (e.g., 1–100).
The player inputs guesses via the console.
After each guess, the program gives feedback:
“Too high!” if the guess is greater than the number
“Too low!” if the guess is smaller than the number.
Counts the number of attempts until the player guesses correctly.
Optionally, the game can:
Limit the number of tries.
Allow the user to choose the range.
Display the score or best attempt record.
Learning Objectives:
- Practice using Python’s random module.
- Gain experience with input() and type conversion.
- Define CONSTANT and variables
- Use conditional statements (if, elif, else)
- Use algebra operators
- Use comparison operators
- Implement loops (while) for repeated guessing
- Learn basic error handling for user inputs (isdigit)
Difficulty Level: Beginner 🟢