Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Higher/Lower Game (Python)

A command-line implementation of the classic Higher/Lower game built with Python. Players are presented with two famous personalities or brands and must guess which one has more social media followers. The game continues until an incorrect guess is made, after which the final score is displayed.


📌 Project Overview

This project was developed to strengthen core Python programming concepts while building a fun, interactive terminal game. It demonstrates the use of modular programming, control flow, data handling, and randomization.


🚀 Features

  • 🎲 Randomly selects two entities for comparison
  • 👤 Displays name, profession, and country
  • 📈 Compares follower counts behind the scenes
  • 🔄 Winning option carries forward to the next round
  • 🏆 Live score tracking
  • ❌ Ends immediately after a wrong guess
  • 🖥️ Clean console interface with ASCII art

🛠️ Tech Stack

  • Language: Python 3

  • IDE: Visual Studio Code

  • Modules Used:

    • random
    • Custom Python modules (game_data.py, art.py)

🧠 Python Concepts Demonstrated

Programming Fundamentals

  • Variables
  • Data Types
  • User Input
  • String Formatting (f-strings)
  • Functions
  • Return Statements
  • Local Variables

Data Structures

  • Lists
  • Dictionaries
  • Nested Data Access

Control Flow

  • if
  • elif
  • else
  • while loops
  • Boolean Logic
  • Comparison Operators

Python Built-in Features

  • random.choice()
  • list.index()
  • Function Parameters
  • Function Return Values

Programming Concepts

  • Modular Programming
  • Code Reusability
  • Game Logic
  • State Management
  • Input Validation
  • Score Tracking
  • Randomization
  • Terminal-Based UI

📂 Project Structure

Higher-Lower-Game/
│
├── higher_lower.py          # Main game logic
├── game_data.py     # Dataset of personalities
├── art.py           # ASCII logos and VS graphics
├── README.md

▶️ How to Run

  1. Clone this repository.
git clone https://github.com/VISHAL108-Mech/Higher-Lower.git
  1. Navigate into the project directory.
cd Higher-Lower
  1. Run the program.
python higher_lower.py

🎯 Learning Outcomes

Building this project helped reinforce:

  • Writing reusable functions
  • Working with lists of dictionaries
  • Importing custom modules
  • Designing game loops
  • Maintaining application state
  • Separating data from logic
  • Improving problem-solving skills
  • Writing clean and readable Python code

📸 Gameplay

Compare A: Cristiano Ronaldo, a Footballer, from Portugal.
vs
Compare B: Taylor Swift, a Musician, from USA.

Who has more followers?
Type 'A' or 'B':

Keep guessing correctly to increase your score!


🔮 Future Improvements

  • Difficulty levels
  • Multiple datasets
  • High-score system
  • Score persistence using files
  • Graphical interface (Tkinter/Pygame)
  • Timer mode
  • Hint system
  • Unit testing
  • Exception handling for invalid inputs

💼 Portfolio Highlights

This project showcases my ability to:

  • Build complete Python applications
  • Apply problem-solving techniques
  • Write modular and maintainable code
  • Work with real-world datasets
  • Implement game logic using algorithms
  • Structure Python projects professionally
  • Use GitHub as a project portfolio

📬 Contact

Developer: Vishal Yadav

GitHub: https://github.com/VISHAL108-Mech

LinkedIn: www.linkedin.com/in/vishal-yadav-2a91a7428

Email: vy4122000@gmail.com


📸 Project Output Screenshot

Here’s a sample of the game in action: Screenshot 2026-08-16 204919


⭐ If you found this project interesting, consider giving it a Star on GitHub!

About

A Python command-line game where players guess which of two personalities or brands has more social media followers. The game uses random selection, loops, functions, dictionaries, and conditional logic to track scores and continue until an incorrect guess, showcasing core Python programming concepts.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages