Python Programming Challenge Repository (Beginner → Advanced)
Welcome to a curated roadmap of Python coding exercises designed to take you from beginner to advanced, one challenge at a time. This repository is built around Jupyter Notebooks for interactive learning.
Python Documentation: https://docs.python.org/3/
Who is this for?
- Students looking to level up their core Python
- Developers practicing for coding or analyst interviews
- Bootcampers building project portfolios
- Anyone who wants to improve in a structured, concept-rich way
This repository offers a focused deep-dive into critical areas of Python programming:
- Data Structures & Algorithms
- Object-Oriented Programming (OOP)
- File Handling & Date/Time Operations
- Statistical Analysis & Data Manipulation (Pandas, NumPy)
- List Comprehensions & Functional Programming
LEVEL 1 – Fundamentals & Core Logic (Beginner)
Focus: Strings, math, loops, lists, dicts, conditionals
| # |
Problem Description |
Concepts Covered |
Status |
| 1 |
Check if number is divisible by 13 but not 5 |
if, %, and, input |
✅ Done |
| 2 |
Count frequency of each character in a string & sort |
Loops, dict, sorting |
✅ Done |
| 3 |
Count frequency of words in a sentence |
.split(), dict, loop |
✅ Done |
| 4 |
Convert decimal to binary manually |
Math, loop, string logic |
✅ Done |
| 5 |
Check if a string is a palindrome |
String slicing |
✅ Done |
| 6 |
Squares of even numbers using list comprehension |
List comprehension |
✅ Done |
| 7 |
Countdown to next birthday |
datetime, timedelta |
✅ Done |
| 8 |
Check Armstrong number |
Math, loop, power op |
✅ Done |
| 9 |
Reverse words in a sentence |
.split(), slicing |
❌ Not Yet |
| 10 |
Replace vowels in a string with # |
Loop, string replace |
✅ Done |
| 11 |
Find all prime numbers up to N |
Loops, nested if |
❌ Not Yet |
| 12 |
Compute factorial (loop and recursion) |
for, def, recursion |
✅ Done |
| 13 |
Evaluate formula: Q = √((2×C×D)/H) from inputs |
Math, user input |
✅ Done |
| 14 |
Anagram checker (using freq dict) |
Dict, sets, sorting |
✅ Done |
| 15 |
Calculate LCM & HCF of two numbers |
Math, GCD, loops |
✅ Done |
| 16 |
Simulate robot movement in 2D plane with directions |
Tuples, abs(), loop |
✅ Done |
| 17 |
Run-Length Encoder (Convert aaabbccc → a3b2c3) |
String compression, logic |
✅ Done |
| 18 |
Calculate BMI for adults |
Raise Error, Docstrings |
✅ Done |
LEVEL 2 – Functions, 2D Data & CLI Tools (Intermediate)
Focus: Functions, nested data, CLI interfaces, intro to OOP
| # |
Problem Description |
Concepts Covered |
Status |
| 1 |
Create 2D matrix where [i][j] = i×j |
Nested loops, 2D list |
✅ Done |
| 2 |
Multiply 2 matrices manually |
Loops, nested list |
✅ Done |
| 3 |
Generate strong password |
random, string, loop |
✅ Done |
| 4 |
Rock-paper-scissors CLI game |
CLI loop, random choice |
❌ Not Yet |
| 5 |
Grocery billing with discounts + receipt generator |
Loops, dict, formatting |
❌ Not Yet |
| 6 |
Contact book (add/search/delete) |
Dict of dicts, CLI menu |
✅ Done |
| 7 |
Hotel room booking simulation |
OOP, static method, date handling |
✅ Done |
| 8 |
Replace words in paragraph |
.replace(), string logic |
❌ Not Yet |
| 9 |
Bank Account class with deposit, withdraw, PIN check |
OOP (encapsulation) |
✅ Done |
| 10 |
Frequency plot of letters in a sentence |
ASCII art, count, loop |
❌ Not Yet |
| 11 |
Student Marks Analyzer |
|
✅ Done |
| 12 |
Build a mini-dictionary CLI tool |
Dict, file I/O |
❌ Not Yet |
| 13 |
Validate random password rules |
Conditions, loop |
❌ Not Yet |
| 14 |
Quick math game (timer & scoring) |
Game logic, random |
✅ Done |
| 15 |
Analyze Sales Numbers using pandas |
pandas, summarization |
✅ Done |
| 16 |
Expenses Split Calculator with distributed amounts |
Math, rounding, functions |
✅ Done |
| 17 |
Find 1st and 2nd Derivative and their Plots |
Math, Matplotlib |
✅ Done |
| 18 |
Golden Section Search Method to find Minima |
Math, Matplotlib |
✅ Done |
| 19 |
Reproducible Student Score Analyser |
Dataframe |
✅ Done |
LEVEL 3 – File I/O, Real-world Logic & Games (Upper Intermediate)
Focus: File handling, validation, pandas, JSON, games
| # |
Problem Description |
Concepts Covered |
Status |
| 1 |
Generate invoice with tax & discount |
OOP, dict, formatting |
✅ Done |
| 2 |
Hangman game (word bank, guesses, life system) |
CLI game logic |
✅ Done |
| 3 |
HandCricket game: toss → innings → result |
Game loop, CLI |
✅ Done |
| 4 |
Scientific calculator with logs to file |
Math ops, Error handling, File Handling |
✅ Done |
| 5 |
BMI calculator with logs to file |
File append, math |
❌ Not Yet |
| 6 |
Transaction logger with daily summary |
File I/O, string format |
❌ Not Yet |
| 7 |
Regex password strength checker |
re module, validation |
❌ Not Yet |
| 8 |
Read/write contact book to text file |
file open(), dict parsing |
❌ Not Yet |
| 9 |
Clean CSV, fill missing values |
pandas, fillna, dropna |
❌ Not Yet |
| 10 |
Read JSON, update values, and save |
json module, I/O |
❌ Not Yet |
| 11 |
Replace all duplicate chars with # |
2-pointer, greedy |
✅ Done |
| 12 |
Statistical Analysis of a list of numbers |
List, Filter, Sort, Statistics |
✅ Done |
| 13 |
Sort top 5 earners from .csv file |
pandas, sort_values() |
❌ Not Yet |
| 14 |
Exhaustive Search for minima of a function |
Math, plotting (optional) |
✅ Done |
| 15 |
Crop Planner from JSON |
JSON, String, List |
✅ Done |
LEVEL 4 – APIs, Analytics & Mini Projects (Advanced)
Focus: External libraries, APIs, modular OOP, basic ML/NLP
| # |
Problem Description |
Concepts Covered |
Status |
| 1 |
Email validator + CLI signup system |
Regex, CLI, validation |
❌ Not Yet |
| 2 |
Fetch weather data from OpenWeather API |
API calls, requests, JSON |
❌ Not Yet |
| 3 |
Expense tracker with monthly summary |
OOP, file, CLI tools |
❌ Not Yet |
| 4 |
Convert sales CSV to JSON report |
pandas, JSON, export |
❌ Not Yet |
| 5 |
CLI tool to merge 2 files line-by-line |
File reading, logic |
❌ Not Yet |
| 6 |
Create a quiz app with score and levels |
OOP, state, CLI |
❌ Not Yet |
| 7 |
Income predictor using Linear Regression |
sklearn, data prep |
❌ Not Yet |
| 8 |
Sentiment analysis on product reviews |
TextBlob, nltk |
❌ Not Yet |
| 9 |
Income tax calculator (slabs + surcharge logic) |
Conditions, formatting |
❌ Not Yet |
| 10 |
Full OOP invoice system with session state |
OOP, Streamlit, UI logic |
❌ Not Yet |
How to Use This Repository
- Choose a difficulty level you're comfortable with. (Currently, there are 3 levels – more coming soon!)
- Each level folder contains Jupyter Notebooks numbered as per the README.
- Every notebook includes a real-world coding problem, followed by its solution.
Try solving the problem yourself before peeking at the solution.
- The problems are mini Python projects designed to mimic real-world use cases you might encounter during interviews, freelancing, or product development.
- The
Assets/ folder contains all necessary input datasets and output/reference files.
- You’ll find open Issues with additional problem suggestions — feel free to attempt them!
- Fork this repo and raise a PR to add your own problem variants or improvements!
Keywords
python beginner exercises, python coding problems, oop python practice, interview prep python, real world python mini projects, file io pandas python, python games and utilities
Recommended Tools to Pair
- Jupyter Notebook / VS Code / Spyder
- Python ≥ 3.9
pandas, requests, textblob, random, math
Contribute
- Want to add more problems?
- Found a bug in a solution?
- Submit a Pull Request 🚀
Happy Coding