Skip to content

Interactive Number Guessing Game with ASCII Art – Personal Project

Notifications You must be signed in to change notification settings

OluwaseyiPopoola/Guess-My-Number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Guess-My-Number

Interactive Number Guessing Game with ASCII Art – Personal Project Guess My Number – Interactive Python Game 🎲🐄🦖 Description

Guess My Number is a fun, story-driven Python game where you must guess the number a mischievous T-Rex is thinking of to save your friend Sallie the cow! The game combines interactive storytelling, ASCII art via cowsay, and a number-guessing challenge with limited attempts.

It’s perfect for beginners learning Python, loops, functions, and modular programming while having fun.

Features

Interactive story: Follow the dialogue between Sallie the cow and a hungry T-Rex.

ASCII art animations: Uses cowsay to display characters talking.

Random number generation: The computer picks a number within a user-defined range.

Guessing limit: Players get 5 attempts to guess the correct number.

Attempt tracking: Displays remaining attempts after each guess.

Pauses for immersion: Replaces long waits with Press Enter to continue... for better user experience.

Requirements

Python 3.8+

Install dependencies:

pip install cowsay pyfiglet

How to Play

Run the game:

python guess_my_number.py

Follow the instructions on-screen:

Set the maximum number for the guessing range.

Listen to the story between Sallie the cow and the T-Rex.

Confirm that you’re ready to guess.

Enter your guesses.

The game tells you if your guess is too high, too low, or correct.

You have 5 attempts to save Sallie!

Game ends when:

You guess the number correctly (win), or

You run out of attempts (game over).

Example Gameplay Hi, I'm Sa... He's coming, Hide! Hmmmm... I smell dinnerrrr ... Take a guess (You have 5 tries left): 7 HA HA HA.... Too low! You have 4 tries left ... Lucky! You guessed it! Sallie is free 🎉

Project Structure

guess_my_number/ │ ├─ guess_my_number.py # Main game script ├─ README.md # This file └─ requirements.txt # Optional: list of dependencies

Future Improvements

Add multiple difficulty levels with more attempts.

Include more ASCII characters and story variations.

Store high scores or number of attempts in a leaderboard.

Author

Oluwaseyi Popoola – Python enthusiast and story coder.

About

Interactive Number Guessing Game with ASCII Art – Personal Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages