Skip to content

metardr/Number-Guessing-Game-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Number Guessing Game

This is a simple Python-based number guessing game. The program generates a random number between 1 and 100, and the player must guess the number. The program provides feedback for each guess ("Higher!" or "Lower!") until the correct number is guessed. The number of attempts is displayed upon winning.

Features

  • Randomly generates a number between 1 and 100.
  • Accepts user input for guessing the number.
  • Provides feedback ("Higher!" or "Lower!") to guide the user.
  • Counts the number of attempts and displays them upon winning.
  • Handles invalid input gracefully by prompting the user for valid input.
  • Option to play again after finishing a game.

Requirements

  • Python 3.x
  • No additional modules are required; the program uses Python's built-in random module.

How to Run the Game

  1. Save the code to a .py file, for example, number_guessing_game.py.

  2. Open a terminal or command prompt.

  3. Run the program with the command:

    python number_guessing_game.py

About

A simple python number guessing game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages