- Cyber Success
- July 7, 2023
- IT Courses
15 Python Mini Projects for Beginners in 2026
A Python mini project is a small, self-contained program, usually 30 to 200 lines, that solves one practical problem. Examples include converting currencies, generating passwords and tracking expenses. Mini projects turn individual Python concepts such as loops, functions, dictionaries and files into a working application. They are also the quickest way to build proof of skill for a portfolio or resume.
Projects matter more than ever for Python learners:
- Python is the most popular language on the TIOBE Index (No. 1 at 17.76% in September 2026).
- 8% of people learning to code used Python in the Stack Overflow 2025 Developer Survey.
That competition means recruiters look for evidence beyond course certificates. A GitHub profile with working projects provides it.
This guide lists 15 Python projects for beginners. Each one comes with a short, tested code snippet to start from: the 10 classic mini projects, followed by 5 newer projects that use pandas, web APIs, web scraping and Flask. An overview table gives the concepts, difficulty and build time for each, and the guide ends with how to present Python mini projects on your resume and GitHub.
Table of contents
- Python Mini Projects at a Glance
- 10 Python Mini Projects for Beginners (With Code)
- 5 New Python Projects for 2026 (With Source Code)
- How to Put Mini Projects on Your Resume and GitHub
- Learn Python at Cyber Success
- Frequently Asked Questions
Python Mini Projects at a Glance
The table lists all 15 Python mini projects with the concepts each one teaches, its difficulty, and a realistic build time for a beginner. Start with the easiest projects in the table, and add at least one intermediate project before you apply for jobs.
|
# |
Project |
Concepts learned |
Difficulty |
Time to build (basic version) |
|
1 |
Dice rolling simulator |
random, functions, loops |
Easy |
30–60 minutes |
|
2 |
Rock paper scissors |
Conditions, dictionaries, random |
Easy |
1 hour |
|
3 |
Password generator |
secrets, string, string joining |
Easy |
1 hour |
|
4 |
Calculator |
Functions, operators, error handling; optional Tkinter GUI |
Easy |
1–2 hours (+2 hours for GUI) |
|
5 |
Currency converter |
Dictionaries, functions, optional API calls |
Easy |
1–2 hours |
|
6 |
Quiz app |
Lists of dictionaries, loops, scoring |
Easy |
2 hours |
|
7 |
Hangman game |
Strings, sets, loops, game state |
Easy–Medium |
2–3 hours |
|
8 |
To-do list |
File I/O, pathlib, menus |
Easy–Medium |
2–3 hours |
|
9 |
Contact book |
Dictionaries, JSON files, CRUD operations |
Medium |
3–4 hours |
|
10 |
Tic tac toe |
2D logic, win checking, game loop |
Medium |
3–4 hours |
|
11 |
Expense tracker |
CSV, pandas, grouping, summaries |
Medium |
3–5 hours |
|
12 |
Weather app |
REST APIs, requests, JSON parsing |
Medium |
2–4 hours |
|
13 |
Web scraper |
HTML parsing with BeautifulSoup, requests |
Medium |
3–5 hours |
|
14 |
Music player |
pygame mixer, file lists, controls |
Medium |
4–6 hours |
|
15 |
URL shortener |
Flask, routes, redirects, HTTP status codes |
Medium–Hard |
4–6 hours |
Build times are estimates for a learner who knows Python basics, and cover a working basic version. Adding a GUI, file storage, tests or deployment typically doubles the time, and also makes the project much stronger on a resume.
10 Python Mini Projects for Beginners (With Code)
Editor note: this replaces “Top Python Mini Projects for Beginners to Practice”. The 10 existing project H3s are kept in the same order, each with a code snippet added and the descriptions corrected.
Each project below includes a short, working starting snippet. Copy it, run it, and then extend it with the features listed under it. Extending the code is where most of the learning happens.
1. Currency converter
Convert an amount between currencies using exchange rates stored in a dictionary.
RATES_TO_INR = {“INR”: 1.0, “USD”: 88.0, “EUR”: 102.0, “GBP”: 118.0} # sample rates
def convert(amount, from_cur, to_cur):
inr = amount * RATES_TO_INR[from_cur]
return round(inr / RATES_TO_INR[to_cur], 2)
print(convert(100, “USD”, “INR”)) # 8800.0
Extend it: fetch live rates from a free exchange-rate API with requests, and validate currency codes. The rates above are samples, so use live data for real conversions.
2. Calculator
Perform basic arithmetic and handle division by zero.
import operator
OPS = {“+”: operator.add, “-“: operator.sub, “*”: operator.mul, “/”: operator.truediv}
def calculate(a, op, b):
if op == “/” and b == 0:
return “Cannot divide by zero”
return OPS[op](a, b)
print(calculate(12, “*”, 4)) # 48
Extend it: build a button interface with Tkinter and add a calculation history.
3. Password generator
Create strong random passwords of any length. The secrets module is designed for security, unlike random.
import secrets, string
def make_password(length=12, symbols=True):
chars = string.ascii_letters + string.digits + (string.punctuation if symbols else “”)
return “”.join(secrets.choice(chars) for _ in range(length))
print(make_password(16))
Extend it: add a password strength checker, and guarantee at least one digit and one symbol.
4. Tic tac toe
Two players take turns placing X and O on a 3×3 grid. The core skill is checking for a winner.
WINS = [(0,1,2),(3,4,5),(6,7,8),(0,3,6),(1,4,7),(2,5,8),(0,4,8),(2,4,6)]
def winner(board):
for a, b, c in WINS:
if board[a] != ” ” and board[a] == board[b] == board[c]:
return board[a]
return None
print(winner([“X”,”O”,”X”, ” “,”X”,”O”, ” “,” “,”X”])) # X
Extend it: add a game loop with input(), detect draws, and add a simple computer opponent. Use pygame for a graphical version.
5. Contact book
Add, edit, search and delete contacts, and save them to a JSON file.
import json
contacts = {}
def add_contact(name, phone, email=””):
contacts[name] = {“phone”: phone, “email”: email}
add_contact(“Asha”, “98xxxxxx01”, “asha@example.com”)
with open(“contacts.json”, “w”) as f:
json.dump(contacts, f, indent=2)
Extend it: load contacts at startup, add search by name, and validate phone numbers.
6. Hangman game
Guess a hidden word one letter at a time before running out of attempts.
import random
word = random.choice([“python”, “pune”, “laptop”])
guessed = set(“pn”) # letters guessed so far
print(” “.join(ch if ch in guessed else “_” for ch in word)) # e.g. p _ _ _ _ n
Extend it: add an attempts counter, reject repeated guesses, and draw the hangman in text.
7. Dice rolling simulator
Simulate rolling one or more six-sided dice.
import random
def roll(dice=2):
return [random.randint(1, 6) for _ in range(dice)]
print(roll()) # e.g. [4, 2]
Extend it: add a “roll again?” prompt and track statistics over 1,000 rolls.
8. To-do list
Add and list tasks, saved to a text file so they persist between runs.
from pathlib import Path
FILE = Path(“todo.txt”)
def add_task(task):
with FILE.open(“a”) as f:
f.write(task + “\n”)
def list_tasks():
return FILE.read_text().splitlines() if FILE.exists() else []
add_task(“Revise loops”)
print(list_tasks()) # [‘Revise loops’]
Extend it: mark tasks done, delete tasks, and add due dates or priorities.
9. Music player
Play audio files with volume control using pygame’s mixer.
import pygame
pygame.mixer.init()
pygame.mixer.music.load(“song1.mp3”) # any .mp3 or .wav file
pygame.mixer.music.set_volume(0.5) # 0.0 to 1.0
pygame.mixer.music.play()
Extend it: add a playlist, play/pause/next controls in a Tkinter window, and display the song title.
10. Rock paper scissors
Play against the computer.
import random
BEATS = {“rock”: “scissors”, “scissors”: “paper”, “paper”: “rock”}
def play(user):
computer = random.choice(list(BEATS))
if user == computer:
return computer, “Draw”
return computer, “You win” if BEATS[user] == computer else “You lose”
print(play(“rock”)) # e.g. (‘scissors’, ‘You win’)
Extend it: keep score across rounds, validate input, and add “best of five” mode.
5 New Python Projects for 2026 (With Source Code)
These five Python projects use the libraries employers actually list: pandas, requests, BeautifulSoup and Flask. They are a step up from the classic mini projects, and they make stronger resume projects because each one connects to real data, a web API or the web itself.
11. Expense tracker (CSV + pandas)
Load your expenses from a CSV file and see where the money went.
import pandas as pd
df = pd.read_csv(“expenses.csv”, parse_dates=[“date”]) # columns: date, category, amount
summary = df.groupby(“category”)[“amount”].sum().sort_values(ascending=False)
print(summary)
print(“Total spent:”, df[“amount”].sum())
Sample output for a five-row file: Food 750, Books 650, Travel 200, Total spent: 1600.
Extend it: add monthly totals, a Matplotlib bar chart, and a budget alert when a category crosses its limit.
12. Weather app (REST API)
Show the current temperature and wind speed for any city using the free Open-Meteo API, which needs no API key for non-commercial use.
import requests
def get_weather(lat, lon):
url = “https://api.open-meteo.com/v1/forecast”
params = {“latitude”: lat, “longitude”: lon, “current”: “temperature_2m,wind_speed_10m”}
data = requests.get(url, params=params, timeout=10).json()
current = data[“current”]
return f”{current[‘temperature_2m’]}°C, wind {current[‘wind_speed_10m’]} km/h”
print(“Pune:”, get_weather(18.52, 73.86)) # e.g. Pune: 29.4°C, wind 11.2 km/h
Extend it: let users type a city name using Open-Meteo’s geocoding API, show a 7-day forecast, and handle network errors with try/except.
13. Web scraper (BeautifulSoup)
Extract structured data, such as titles and prices, from a web page.
import requests
from bs4 import BeautifulSoup
html = requests.get(“https://example.com/courses”, timeout=10).text # a page you may scrape
soup = BeautifulSoup(html, “html.parser”)
for course in soup.select(“div.course”):
print(course.h2.text, “-“, course.select_one(“.duration”).text)
The CSS selectors (div.course, .duration) depend on the target page’s HTML. Inspect the page in your browser to find them. Scrape only sites whose terms allow it, and respect robots.txt. A full walkthrough is in Web Scraping with Python: A Beginner-Friendly Project.
Extend it: save results to CSV with pandas, handle multiple pages, and add delays between requests.
14. Quiz app
Ask multiple-choice questions and calculate a score.
QUESTIONS = [
{“q”: “Which keyword defines a function in Python?”, “options”: [“func”, “def”, “lambda”], “answer”: “def”},
{“q”: “What does len(‘Pune’) return?”, “options”: [“3”, “4”, “5”], “answer”: “4”},
]
def run_quiz(answers):
score = sum(1 for item, ans in zip(QUESTIONS, answers) if ans == item[“answer”])
return f”Score: {score}/{len(QUESTIONS)}”
print(run_quiz([“def”, “5”])) # Score: 1/2 (in the real app, answers come from input())
Extend it: load questions from a JSON file, shuffle them, add a timer, and save high scores.
15. URL shortener (Flask)
A small web app that turns a long URL into a short code and redirects visitors.
import secrets
from flask import Flask, request, redirect, abort
app = Flask(__name__)
links = {} # short code -> long URL
@app.post(“/shorten”)
def shorten():
code = secrets.token_urlsafe(4)
links[code] = request.form[“url”]
return {“short_url”: request.host_url + code}
@app.get(“/<code>”)
def go(code):
if code not in links:
abort(404)
return redirect(links[code])
if __name__ == “__main__”:
app.run(debug=True)
In testing, posting a URL returned a short link, the short link redirected with HTTP 302, and unknown codes returned 404.
Extend it: store links in SQLite, count clicks, validate URLs, add an HTML form, and deploy it so it has a live link for your resume.
How to Put Mini Projects on Your Resume and GitHub
Put 2–3 of your strongest Python projects on your resume. Present each one as a GitHub repository with a clear README, and describe it with one line saying what you built and two or three bullet points listing the tools you used and a result. Recruiters spend seconds on each resume, so favour fewer, finished, well-documented projects over a long list of simple games.
Step 1: Choose which projects to show
- For a Python developer or back-end role: the URL shortener (Flask) and a contact book or to-do list with file or database storage
- For a data analyst role: the expense tracker (pandas) and the web scraper
- Skip on a resume: dice rolling, rock paper scissors and hangman. They are good practice, but too simple to impress unless heavily extended.
Step 2: Make the GitHub repository recruiter-ready
- ☐ A descriptive repository name, such as expense-tracker-pandas, not project1
- ☐ A README with a one-line summary, a screenshot or GIF, features, setup steps (pip install -r requirements.txt) and example output
- ☐ A txt file that lists dependencies
- ☐ Clean code with functions, comments where needed, and no hard-coded passwords or API keys
- ☐ A few tests with pytest for the core logic
- ☐ A live demo link for web apps, from a free hosting tier
- ☐ Several small commits with clear messages, rather than one “final upload”
Step 3: Write the resume entry
Use the formula What you built + tools + result.
URL Shortener Web App | Python, Flask, SQLite | github.com/yourname/url-shortener | Live demo
• Built a Flask web app that shortens URLs and redirects visitors, with 404 handling for invalid links.
• Stored links and click counts in SQLite; added URL validation and an HTML form.
• Wrote pytest tests for the shorten and redirect routes; deployed with a public link.
Expense Tracker | Python, pandas, Matplotlib | github.com/yourname/expense-tracker
• Analysed a year of personal expenses from CSV, grouping spending by category and month.
• Generated monthly bar charts and budget alerts for overspending categories.
Use your own real features and numbers. Interviewers will ask you to explain each line and may ask you to modify the code live.
Step 4: Be ready to talk about it
Prepare a 60-second explanation of each project:
- the problem it solves
- how the code is structured
- one bug you fixed
- what you would add next
This project walkthrough is a standard part of fresher interviews. For more resume guidance, see Resume for IT Freshers.
Learn Python at Cyber Success, Pune
The Python Full Stack course in Pune at Cyber Success takes learners from mini projects to portfolio-ready applications. It covers:
- Python fundamentals
- Django and FastAPI
- SQL
- React
- deployment
Trainers review your projects, and the course includes resume reviews, mock interviews and placement assistance at the Deccan and Karve Nagar centres.
Call +91 9168665644 or email hello@cybersuccess.biz to book a free demo session.
Related reading
Frequently Asked Questions
How many Python projects do I need for a fresher job?
Two or three well-built projects are enough for most fresher roles. Each should be finished, on GitHub with a clear README, and ideally deployed or demonstrable. At least one should go beyond the basics, for example a Flask or Django web app, a data analysis with pandas, or an API-based app. Quality and your ability to explain the code matter more than the number of projects.
Which Python mini project is best for a resume?
The best resume project matches the role you want. For developer roles, a web app such as the Flask URL shortener with a database, tests and a live link works well. For data roles, an expense tracker or web-scraping project that analyses real data with pandas and charts works well. Simple games such as dice or rock paper scissors are good practice, but too basic for a resume unless significantly extended.
Why should beginners build Python mini projects instead of only watching tutorials?
Projects force you to plan a program, combine concepts and fix bugs yourself, which tutorials do not. That independent problem-solving is exactly what coding interviews test.
What Python concepts can I learn through mini projects?
Mini projects cover:
- variables, conditions and loops
- functions
- lists, dictionaries and sets
- file handling and JSON
- error handling
- modules such as random, secrets and pathlib
- libraries such as pandas, requests, BeautifulSoup and Flask
Which libraries are commonly used in beginner Python projects?
The standard library modules random, secrets, string, json, pathlib and tkinter cover most beginner projects. The most useful third-party libraries are requests, pandas, BeautifulSoup, Flask and pygame.
Where can I find Python mini projects with source code?
This page includes starting code for all 15 projects. GitHub also has many open-source examples; search for terms such as “python expense tracker”. Use them for reference, but write your own version so you can explain every line in an interview.
Are Python mini projects useful for interview preparation?
Yes. Interviewers often ask freshers to walk through a project, explain design choices or modify the code. Projects also give you concrete answers to questions such as “Tell me about a bug you fixed.”
