A collection of 50+ beginner-friendly Python programs, each written as a standalone .py file. Perfect for practicing core concepts, prepping for exams/interviews, or just learning Python from scratch.
python-basic-programs/
āāā 01_numbers/ # 20 programs ā math & number logic
āāā 02_strings/ # 10 programs ā string manipulation
āāā 03_lists/ # 10 programs ā lists, searching, sorting
āāā 04_patterns/ # 3 programs ā star & number patterns
āāā 05_matrices/ # 2 programs ā matrix operations
āāā 06_oop_functions/ # 5 programs ā OOP, recursion, exceptions
āāā README.md
Clone the repo and run any program directly:
git clone https://github.com/<your-username>/python-basic-programs.git cd python-basic-programs python3 01_numbers/07_check_prime.py
Requires Python 3.6+ (uses f-strings). No external libraries needed except the built-in collections module used in one file.
- Students learning Python fundamentals
- Anyone preparing for basic coding interviews or lab exams
- Instructors looking for ready-made practice examples
Pull requests are welcome! If you'd like to add a new basic program, follow the existing naming convention (NN_description.py) and place it in the relevant category folder.
Free to use for learning and educational purposes.