Skip to content

This is a simple number guessing game where the user has to guess the random number generated by the computer within the given number of attempts.

Notifications You must be signed in to change notification settings

Paul-Asamoah-Boadu/Number-Guessing-Games

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

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.

About

This is a simple number guessing game where the user has to guess the random number generated by the computer within the given number of attempts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages