Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Yaniv2809/First-python-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

๐ŸŽฎ World of Games

A collection of classic console games built in Python. This project demonstrates the use of modular programming, game logic, file handling (I/O), and error management in Python.

Python

๐Ÿ“‹ Table of Contents


๐Ÿง About the Project

"World of Games" is a Python-based application that serves as a central hub for multiple mini-games. The project was designed with a modular architecture, meaning each game is a standalone module managed by a central controller (main.py).

The project also includes a scoring system that persists data, saving the user's score to a local file even after the program is closed.


๐Ÿ•น๏ธ The Games

1. Memory Game (memory_game.py)

A challenge that tests your memory and speed.

  • Logic: Generates a random sequence of numbers, displays them for a few seconds, and then clears the screen.
  • Challenge: The user must recall the sequence exactly.
  • Smart Feedback: If the user fails, the game indicates exactly how many numbers were guessed correctly in the right position.

2. Guess Game (guess_game.py)

A classic "High/Low" guessing game.

  • Logic: The computer selects a random number within a range based on the chosen difficulty level.
  • Challenge: The user must guess the number. The game provides hints ("Too high", "Too low") to guide the user.

3. Math quiz (math_game.py)

Answer math qustions and get score


๐Ÿš€ Key Features & Skills Demonstrated

  • Modular Design: Separation of concerns by splitting the project into a main controller and separate game modules.
  • File I/O & Persistence: Implementation of score.py to read and write scores to a text file (Scores.txt), ensuring data is saved between sessions.
  • Error Handling: Robust use of try...except blocks to prevent crashes from invalid user inputs.
  • Data Structures: Extensive use of Lists for managing game sequences and loops (for/while) for game flow.
  • Standard Libraries: Usage of Python's built-in libraries: random, time, os.
  • Clean Code: Written with readability and maintainability in mind.

๐Ÿ“‚ Project Structure

World_Of_Games/
โ”‚
โ”œโ”€โ”€ main.py # The entry point / Game Manager
โ”œโ”€โ”€ memory_game.py # Logic for the Memory Game
โ”œโ”€โ”€ guess_game.py # Logic for the Guess Game
โ”œโ”€โ”€ math_game.py # Logic for Math game โ”œโ”€โ”€ score.py # Handles reading/writing scores to a file
โ””โ”€โ”€ Scores.txt # Stores the user's total score

About

Creating three console games in Python, the goal is to present knowledge of the basics of the Python programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /