Skip to content

rohit-373/Number-Guessing-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Number Guessing Game

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:

  1. Run the script: Execute the Python script in your preferred environment.
  2. Select difficulty: Choose the desired difficulty level by entering 1, 2, or 3.
  3. Guess the number: Input your guess for the random number.
  4. Receive feedback: The script will provide feedback on whether your guess is too high, too low, or correct.
  5. 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