Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.29 KB

README.md

File metadata and controls

37 lines (26 loc) · 1.29 KB

Guess the Number Game

This repository contains a simple yet fun Python-based game called "Guess the Number." The game challenges players to guess a randomly generated number within a specified range. It's a great example of basic programming concepts such as loops, conditionals, and user input handling in Python.

Features

  • Random Number Generation: The game generates a random number within a defined range.
  • User Interaction: Players input their guesses and receive feedback on whether their guess is too high, too low, or correct.
  • Input Validation: The game checks for invalid inputs and prompts the user to enter a valid number.
  • Replay Option: After guessing the number, players can choose to play again or exit the game.

Getting Started

To run the game locally, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/yourusername/guess-the-number.git
  2. Navigate to the Project Directory:

    cd guess-the-number
  3. Run the Game:

    python guess_the_number.py

Code Overview

The game logic is implemented in guess_the_number.py, which includes:

  • Number generation and range setting.
  • Game loop for handling user input and game progression.
  • Feedback mechanism to guide the player.