Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

🎯 Number Guessing Game (Python)

A simple and fun Number Guessing Game written in Python. The player selects a difficulty level, and the program generates a random number. Your goal? Guess the number in as few attempts as possible!


πŸš€ Features

  • Three difficulty levels:

    • Easy: 1 to 50
    • Medium: 1 to 100
    • Hard: 1 to 500
  • Input validation for better user experience

  • Hints whether your guess is too high or too low

  • Tracks the total number of attempts

  • Option to quit anytime


πŸ“Œ How to Play

  1. Run the Python script:

    python number_guessing_game.py
  2. Choose a difficulty level:

    • 1 β†’ Easy
    • 2 β†’ Medium
    • 3 β†’ Hard
  3. Enter your guesses until you find the correct number.

  4. The game will tell you:

    • If your guess is too big
    • If your guess is too small
  5. When you win, the game shows your total attempts.

  6. Choose to play again or exit.


πŸ“ Example Output

-----Number Guessing Game-----
Choose Difficulty Level
1- Easy(1,50)
2- Medium(1,100)
3- Hard(1,500)
Enter Difficulty level 1/2/3 or Quit(Q) to exit: 2
Enter Your Guess or Quit(q): 45
Small Number, Guess Bigger Number
Enter Your Guess or Quit(q): 87
Big Number, Guess Smaller Number
Enter Your Guess or Quit(q): 71
Congrats!!! You Guessed it Right, Attempts: 3

πŸ“‚ Repository Structure

πŸ“ Number-Guessing-Game
│── number_guessing_game.py
└── README.md

βœ… Enjoy the Game!

Feel free to modify or enhance the logic and make it your own!

About

First thing I built after learning Python.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages