Skip to content

A simple Python number guessing game where the user tries to guess a randomly generated number. Includes attempts tracking and user feedback.

Notifications You must be signed in to change notification settings

devi1610/number-guessing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Number Guessing Game

A simple Python project where the computer selects a random number and the user tries to guess it.

Features

  • User enters a start and end range
  • Computer selects a random number in that range
  • Gives hints: "Too high" or "Too low"
  • Tracks number of attempts
  • Beginner-friendly

How to Run

  • Install Python
  • Download or clone this repository
  • Open the terminal inside the project folder
  • Run: python number_guessing_game.py

Skills Used

  • Python basics
  • Loops
  • Conditions
  • Functions
  • random module
  • Error handling

Example Output

===== Number Guessing Game =====

Enter start of the range: 1

Enter end of the range: 50

I have selected a number between 1 and 50. Try to guess it!

Enter your guess: 25

Too low! Try again.

Enter your guess: 40

Too high! Try again.

Enter your guess: 33

Correct! You guessed the number in 3 attempts.

Conclusion

This project is perfect for beginners who want to practice Python and understand basic logic building.

About

A simple Python number guessing game where the user tries to guess a randomly generated number. Includes attempts tracking and user feedback.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages