Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.44 KB

README.md

File metadata and controls

28 lines (20 loc) · 1.44 KB

Number Guessing

This is a simple Number Guessing Game. The game generates a random number between 1 and 100, and the player has to guess the number in a given number of turns.

The game offers two levels of difficulty: easy and hard. In the easy level, the player gets 10 turns to guess the number, while in the hard level, the player gets only 5 turns.

How to Play

  • At first, the game generates a random number between 1 and 100.
  • Then, the player chooses the level of difficulty - easy or hard.
  • In the easy level, the player gets 10 attempts to guess the number and in the hard level, the player gets only 5 attempts to guess the number.
  • The player enters their guess.
  • The game will indicate whether the guess is too low or too high.
  • If the player cannot guess the number within the given number of attempts, they lose the game.

Features

  1. The game uses the random module to generate random numbers.
  2. The game uses the art module to print the logo.
  3. The game has two levels of difficulty - easy and hard.
  4. The game handles input errors gracefully.
  5. The game prints messages to indicate whether the guess is too low or too high.
  6. The game congratulates the player if they guess the number within the given number of attempts.
  7. The game has a replay function.

Contribution

Contributions are welcome! If you find a bug or have a suggestion for improvement, please create an issue or open a pull request.