sheri-na / Guessing-game

Interactive guessing game to find a mystery number between 0 to 10 πŸ•΅οΈβ€β™‚οΈπŸ”’

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This Python program initiates a game in which the player attempts to guess a mysterious digit chosen randomly between 0 and 10. The game allows a maximum of three attempts for the player to guess the correct number.

Description

The code prompts the player to input a number between 1 and 10 to guess the randomly selected mysterious digit. The player is given a limited number of attempts to uncover the exact number.

How to Play

Game Start:

The game begins by generating a random number between 0 and 10.

User Input:

The player is prompted to input a number.

Guess Attempts:

The player is allowed three attempts to guess the correct number.

Game Logic:

  • If the guessed number is smaller than the mysterious digit, the program notifies the player that the number is too small.
  • If the guessed number is larger than the mysterious digit, the program alerts the player that the number is too large.
  • If the guessed number matches the mysterious digit, the player successfully unlocks the mysterious number, and the game ends.

End Game:

If the player exhausts all three attempts without guessing the correct number, the program reveals the mysterious digit and ends the game. Usage

Execution:

Run the Python program to start the number guessing game.

Input:

Input a number between 1 and 10 when prompted to guess the mysterious digit.

Outcome:

  • If the guessed number matches the mysterious digit, the player wins.
  • If the player fails to guess the number within three attempts, the game concludes with the mysterious number revealed.

About

Interactive guessing game to find a mystery number between 0 to 10 πŸ•΅οΈβ€β™‚οΈπŸ”’


Languages

Language:Python 100.0%