A modular Python project that provides a menu-driven interface for running multiple standalone Python programs. Each program is implemented as its own class, stored in a separate file, and automatically discovered at runtime.
This repository is designed to be extensible, educational, and easy to grow as new programs are added.
- Demonstrate clean Python architecture using classes and packages
- Allow new programs to be added without modifying menu code
- Provide a simple command-line user experience
- Serve as a learning sandbox for experimenting with Python programs
project_root/
│
├── main.py # Application entry point
├── PyProgramBase.py # Base class for all programs
├── README.md # Project documentation
│
├── assets/ # Shared assets folder
│ └── SlidingPuzzleImages/ # images for each puzzle size coming soon
│ ├── puzzle_4x8.png
│ ├── puzzle_5x8.png
│ ├── puzzle_8x6.png
│ ├── puzzle_8x7.png
│ └── puzzle_8x8.png
└── programs/ # Individual program implementations
├── __init__.py
├── PyHelloWorld.py
├── PyMathProgram.py
├── PyRecamansSequence.py
├── PySlidingPuzzle.py
Make sure you have Python 3.10+ installed.
From the project root directory:
python main.pyYou will be presented with a numbered menu. Enter a number to execute the corresponding program.
-
main.pyautomatically discovers program classes in theprograms/folder -
Only files starting with
Pyare loaded -
Each program must:
- Be defined in its own file
- Inherit from
ProgramBase - Implement a
run()method
No manual registration is required — new programs appear automatically in the menu.
- Create a new file in the
programs/directory:
programs/PyMyNewProgram.py
- Use the following template:
from PyProgramBase import ProgramBase
class MyNewProgram(ProgramBase):
def run(self):
print("My new program is running!")- Run
main.py— your program will appear in the menu automatically.
Basic example program used to verify the menu and discovery system.
Simple arithmetic demonstration.
A persistent implementation of Recamán’s sequence that:
- Stores the entire sequence across runs
- Prevents duplicates
- Appends 100 new values per execution
- Monitors storage file size and prompts for reset if it exceeds 10 MB
The sequence is stored locally in recaman_sequence.json.
An exercise in creating a game fully in Python.
- The player selects a size based on the number of tiles and the program loads an image, slices it up, and scrambles it.
- A timer is used to measure player performance
- A json file stores the high scores for each puzzle size
Some programs (such as Recamán’s Sequence) persist data to disk.
To reset stored data manually, delete the associated .json file from the project root.
This README is intentionally designed to grow. Possible future additions:
- Program categories
- Configuration file support
- Logging and diagnostics
- Unit tests
- Plugin-style enable/disable flags
#= Main heading##= Section heading###= Subsection heading- Triple backticks (```) create code blocks
- Blank lines improve readability
Markdown is designed to be readable as plain text — keep it simple.
This project is for personal and educational use. Add a license here if you plan to distribute it.