In this game, program randomly selects a number between 1 and 100, and the player has to guess it. After guess, the program gives hint: Cold βοΈ β Your guess is far from the secret number (difference more than 10). Hot π₯ β Your guess is close to the secret number (within 10). Right β You guessed the number correctly!
A fun and simple Python game where you try to guess a secret number between 1 and 100.
The game gives you hints (Cold, Hot, or Right) after each guess.
- Randomly generates a number between 1 and 100
- Provides hints:
- Cold β Your guess is far (difference > 10)
- Hot β Your guess is close (difference β€ 10)
- Right β You guessed it correctly
- Runs until the player finds the secret number
- Python 3.x
No external libraries are required.
##
-
Clone this repository:
git clone https://github.com/your-username/number-guessing-game.git cd number-guessing-game -
Run the game: python guess.py
-
Example Gameplay Enter a number between 1 and 100: 50 Cold Enter a number between 1 and 100: 75 Hot Enter a number between 1 and 100: 82 You guessed it Right!
Learning Objectives
Using random module in Python Writing functions and loops Handling user input