Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Number Guessing Game

Overview

This is a simple Python-based number guessing game where the player attempts to guess a randomly generated number within a limited number of attempts.

The project is designed as a beginner-friendly application to demonstrate core programming concepts such as loops, conditional logic, and user interaction.

Features

  • Generates a secret number between 1 and 100
  • Provides limited attempts (default = 5)
  • Gives feedback if the guess is:
    • Too low
    • Too high

Ends when:

  • The correct number is guessed
  • All attempts are used

https://github.com/NmaCharis/Guessing-game/blob/main/game.py

How to Play

  1. Clone or download this repository
  2. Open your terminal or command prompt
  3. Run the program:

bash python Game.py

Example

Welcome to the Number Guessing Game! You have 5 attempts to guess the correct number.

Enter your guess: 20 Too low!

Enter your guess: 75 Too high!

Enter your guess: 50 Correct! You guessed the number.

Learning Objectives

This project helps in understanding:

Using while loops in Python Handling user input with input() Applying conditional statements (if, elif, else) Building simple interactive command-line applications Technologies Used Python

Author

Chidinma Charity Igwe

License

This project is licensed under the MIT License.

About

A beginner-friendly Python number guessing game that demonstrates loops, conditional logic, and user interaction through a simple command-line interface.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages