Skip to content

The “Guess the Number” game is a fun Python command-line game where the computer picks a random number, and the player tries to guess it. The game gives hints if the guess is too high, too low, or correct, making it an enjoyable challenge.

License

Notifications You must be signed in to change notification settings

shivankushsingh09/Guess-the-Number-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Guess the Number Game

A simple command-line game written in Python where the player attempts to guess a randomly generated number within a specified range.

Table of Contents

Introduction

The "Guess the Number Game" is a fun and interactive Python program that challenges the player to guess a number chosen by the computer within a specified range. This project is designed to help beginners understand basic concepts in Python such as loops, conditionals, and user input.

Features

  • Random number generation within a specified range
  • User input for guessing the number
  • Feedback on guesses (too high, too low)
  • Count of the number of attempts
  • Option to play again

Installation

To run this game on your local machine, follow these steps:

  1. Clone the repository:

       git clone https://github.com/shivankushsingh09/Guess-the-Number-Game.git
  2. Navigate to the project directory:

       cd Guess-the-Number-Game
  3. Ensure you have Python installed. This game is compatible with Python 3.x.

Usage

To start the game, run the following command:

   python Guess-the-Number-Game.py

Gameplay

  1. The game will prompt you to enter the lower and upper bounds for the number range.
  2. A random number will be generated within this range.
  3. You will be prompted to guess the number.
  4. After each guess, you will receive feedback indicating whether your guess was too high, too low, or correct.
  5. The game will keep track of the number of attempts.
  6. Once you guess the correct number, you will be given the option to play again.

Screenshot

Technologies Used

  • Python

Contributing

Contributions are welcome! If you have any suggestions or improvements, feel free to open an issue or submit a pull request.

  1. Fork the repository.

  2. Create a new branch:

       git checkout -b feature-branch-name
  3. Make your changes and commit them:

    git commit -m 'Add some feature'
    
  4. Push to the branch:

    git push origin feature-branch-name
  5. Open a pull request.

License

This project is licensed under the MIT License. See the License file for details.

Contact

About

The “Guess the Number” game is a fun Python command-line game where the computer picks a random number, and the player tries to guess it. The game gives hints if the guess is too high, too low, or correct, making it an enjoyable challenge.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages