Skip to content

marjan-ahmed/number-guessing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔢 Number Guessing Game

Overview

A simple yet engaging number guessing game built with Python and Streamlit. Test your intuition by guessing the number the computer has chosen across three difficulty levels!

Features

  • Three Difficulty Levels:

    • Easy (1-50 numbers)

    • Medium (1-100 numbers)

    • Hard (1-200 numbers)

  • Score Tracking: Keeps count of your correct guesses

  • Attempt Counter: Tracks total number of guesses

  • Instant Feedback: Tells you whether your guess was higher or lower than the target

  • Responsive UI: Clean interface built with Streamlit

How to Play

  1. Select your preferred difficulty level

  2. Enter your guess in the number input field

  3. Click "Submit" to see if you guessed correctly

  4. The game will tell you if your guess was higher or lower than the target number

  5. When you guess correctly, your score increases!

  6. The game tracks your total attempts across sessions

Requirements

  • Python 3.13

  • Streamlit

  • Random (built-in Python module)

Game Logic

  • The computer randomly selects a number within the chosen difficulty range

  • You win when your guess matches the computer's number

  • Your score increases by 1 with each correct guess

  • The game tracks your total attempts regardless of correct/incorrect guesses

Releases

No releases published

Packages

No packages published

Languages