Description:
This Python script implements a number guessing game where the user tries to guess a randomly generated number within a specified range. The difficulty level of the game can be selected, affecting the number of chances given to the user.
How to Use:
- Run the script: Execute the Python script in your preferred environment.
- Select difficulty: Choose the desired difficulty level by entering 1, 2, or 3.
- Guess the number: Input your guess for the random number.
- Receive feedback: The script will provide feedback on whether your guess is too high, too low, or correct.
- Continue guessing: Keep guessing until you either guess the correct number or run out of chances.
Features:
- Difficulty levels: Choose from easy, medium, or hard modes.
- Random number generation: The script generates a random number within a specified range.
- Chance tracking: The number of remaining chances is displayed.
- Feedback: The script provides hints on whether the guess is too high or too low.
- Win/lose messages: Appropriate messages are displayed upon guessing correctly or running out of chances.
Requirement:
- Python 3
Link:
This is a project as part of roadmap.sh