Skip to content

anurag87204/py-guessing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🎲 Number Guessing Game

This is a Python script for a simple number guessing game. You guess a number between 1 and 10, and the computer tells you if your guess is too high, too low, or correct.

🌟 What I Learned

  • Loops (while loop): How to keep the game going until the right number is guessed.
  • Conditional Statements (if, elif, else): How to check if the guess is correct, too high, or too low.
  • Python's random Library: To make the game interesting by having the computer pick a random number every time.
  • Input and Output: Getting the player's guess and showing messages.

🚀 How to Play

  1. Run the guess_the_number.py script in Python.
  2. The game will ask you to guess a number between 1 and 10.
  3. Type your guess and press Enter.
  4. The game tells you if your guess is right, too high, or too low. Keep guessing until you get it right.
  5. When you guess right, you can choose to play again or stop.

🔍 Known Issues

  • The game does not check if you put in something that's not a number. If you do, it might stop working.

🛫 Try It Yourself

  1. Download the guess_the_number.py file.
  2. Open it in a Python program like IDLE.
  3. Run the script and start guessing!
  4. See how the game works and have fun.

Releases

No releases published

Packages

No packages published

Languages