Skip to content

Howdy! This is my Number Guessing Game that I've created after 1 hour of learning Python!

License

Notifications You must be signed in to change notification settings

adett2013/python-NumberGuessGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

๐ŸŽฏ Python Number Guess Game

Python Version License Number Range Status

A fun command-line number guessing game built in Python โ€” made after just 1 hour of learning! ๐Ÿš€


๐Ÿ“– About

Howdy! This is a Number Guessing Game created as a beginner Python project. The computer randomly picks a number between 1 and 5 and you get one shot to guess it. Guess right and you win โ€” guess wrong and a new number is picked for another round! ๐ŸŽ‰


โœจ Features

Feature Description
๐ŸŽฒ Random Number Generation A new secret number (1โ€“5) is picked every round
โšก Single-Guess Rounds One guess per round โ€” beat the odds!
๐Ÿ”„ Replay Support Type y or yes after winning to play again
๐Ÿ•ต๏ธ Number Reveal If you miss, the correct number is shown so you always learn

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.6+ installed on your machine. Download it from python.org.

Installation

# Clone this repository
git clone https://github.com/adett2013/python-NumberGuessGame.git

# Navigate into the project directory
cd python-NumberGuessGame

Running the Game

python main.py

๐ŸŽฎ How to Play

  1. Run the script using the command above.
  2. The program picks a random number between 1 and 5.
  3. Type your guess (a number from 1 to 5) and press Enter.
  4. Two outcomes are possible:
    • ๐ŸŽ‰ Correct! โ€” The number is revealed and you're asked if you want to play again.
    • โŒ Wrong! โ€” The correct number is revealed, and a fresh round starts automatically.
  5. After a correct guess, type y or yes to play again, or anything else to quit.

๐Ÿ“ธ Example Gameplay

Winning round:

Welcome to the number guessing game! You have to guess the random number between 1-5. Lets go!
Type your guess! 3
You've guessed the correct number! Number: 3
Type y to play again. Type n to quit. y
Type your guess! 

Losing round:

Welcome to the number guessing game! You have to guess the random number between 1-5. Lets go!
Type your guess! 2
The random number was 4
Try again. Note: The number has changed after your guess.
Type your guess! 

Quitting:

Type y to play again. Type n to quit. n
Thanks for playing my game. This means a lot to me!
Find more games on https://www.arne-dettmer.de

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“œ License

This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.


Made with โค๏ธ and Python ยท Happy Guessing! ๐ŸŽฏ

Find more games on arne-dettmer.de

About

Howdy! This is my Number Guessing Game that I've created after 1 hour of learning Python!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages