The best Python projects for beginners are small and finished: a guessing game, a password generator, a terminal to-do list, a file organiser, a weather command-line tool, a Flask or FastAPI app and a first machine learning model on a public dataset. Build one from each group below, add the stand-out upgrade, push it to GitHub with a README and deploy anything that runs on the web.
Pick something you would actually use. Each idea below names the data it needs and an upgrade that makes it portfolio-worthy. Starter code for four of them is at the end, and every sample was run before it was published.
- 1Pickone small idea
- 2Planinputs, outputs, rules
- 3Buildthe simplest version
- 4Testbreak it on purpose
- 5ShareGitHub README, live link
First scripts (a weekend each)
Number guessing game
BeginnerPython, random
DataNone
Stand-outCount the tries and add a binary-search hint mode
Password generator
Beginnersecrets, string
DataNone
Stand-outGuarantee each character type and test it over 1,000 runs
To-do list in the terminal
Beginnerjson, argparse
DataNone
Stand-outSave to a file and add due dates
Unit and currency converter
Beginnerrequests
DataFrankfurter exchange rates (free, no key)
Stand-outCache the last rates so it works offline
Quiz game from a JSON file
Beginnerjson, random
DataYour own questions
Stand-outA score history for each player
Rock paper scissors against a learning bot
Beginnerrandom
DataNone
Stand-outShow the win rate over 100 rounds against each strategy
Word frequency counter
Beginnercollections.Counter
DataAny public-domain book as a text file
Stand-outRemove stop words and chart the top 20
Expense tracker
Beginnercsv, collections
DataYour own spending
Stand-outA monthly summary by category with a chart
Automation and files
File organiser
Beginnerpathlib, shutil
DataYour Downloads folder
Stand-outA dry-run mode and an undo log
Bulk file renamer
Beginnerpathlib, regex
DataYour own files
Stand-outA preview before anything is renamed
PDF merger and splitter
Beginnerpypdf
DataYour own PDFs
Stand-outA command-line interface with page ranges
Weather command-line tool
Beginnerrequests
DataOpen-Meteo forecast API (free, no key)
Stand-outRetries on errors and a five-day table
Daily email digest
Intermediatesmtplib, schedule
DataAn RSS feed you choose
Stand-outAn unsubscribe line and a send log, tested with a throwaway account
Folder watcher that sorts new files
Intermediatewatchdog
DataA local folder
Stand-outHandles half-downloaded files safely
Web apps and APIs
URL shortener
IntermediateFlask or FastAPI, SQLite
DataNone
Stand-outClick counts and collision-safe short codes
Personal blog
IntermediateFlask, SQLite
DataYour own posts
Stand-outLogin, drafts and Markdown rendering
REST API for a notes app
IntermediateFastAPI, pytest
DataYour own schema
Stand-outAutomatic docs and tests for every route
Library search app
BeginnerFlask or Streamlit
DataOpen Library search API (free, no key)
Stand-outPagination and a reading list
Telegram bot
Intermediatepython-telegram-bot
DataYour own commands
Stand-outRate limiting and a /help command
Price tracker for one product
Intermediaterequests, BeautifulSoup
DataA page whose terms allow it
Stand-outRespects robots.txt and waits politely between requests
Streamlit dashboard
BeginnerStreamlit, pandas
DataAny open dataset
Stand-outDeployed free on Streamlit Community Cloud
Data and machine learning
Analyse your own data export
Beginnerpandas, matplotlib
DataYour Google Takeout or phone screen-time export
Stand-outOne chart that surprised you, with the code
Titanic survival predictor
Beginnerscikit-learn
DataThe Kaggle Titanic competition data
Stand-outCompare three models and explain which features matter
Spam message classifier
Intermediatescikit-learn
DataUCI SMS Spam Collection
Stand-outReport precision and recall, not only accuracy
Movie recommender
Intermediatepandas, scikit-learn
DataMovieLens dataset
Stand-outA plan for new users who have no ratings yet
House price regression
Beginnerscikit-learn
DataCalifornia housing (built into scikit-learn)
Stand-outCross-validation and error by region
Web scraper for practice
Beginnerrequests, BeautifulSoup
Databooks.toscrape.com, a site made for scraping practice
Stand-outSaves to CSV and follows the pagination
Games and algorithms
Hangman
BeginnerPython
DataA word list
Stand-outDifficulty levels based on word length
Tic-tac-toe with an unbeatable computer player
IntermediatePython, minimax
DataNone
Stand-outAlpha-beta pruning and a comparison of positions searched
Snake game
Intermediatepygame
DataNone
Stand-outA saved high-score table
Sudoku solver
IntermediatePython, backtracking
DataPuzzles you type or load
Stand-outTiming on easy and hard boards
Maze generator and solver
IntermediatePython, BFS and DFS
DataNone
Stand-outAnimate the search and compare BFS with DFS
Starter code: password generator
Uses secrets, which is meant for security, not random. It keeps generating until all four character types appear.
import secrets, string
def make_password(length=14):
symbols = "!@#$%&*"
alphabet = string.ascii_letters + string.digits + symbols
while True:
password = "".join(secrets.choice(alphabet) for _ in range(length))
if (any(c.islower() for c in password) and any(c.isupper() for c in password)
and any(c.isdigit() for c in password) and any(c in symbols for c in password)):
return password
pw = make_password()
print(len(pw), any(c.isdigit() for c in pw))Output: 14 True
Starter code: guessing game logic
Keep the rules in a small function so you can test them without typing guesses.
import random
def check_guess(secret, guess):
if guess < secret:
return "too low"
if guess > secret:
return "too high"
return "correct"
def play(low=1, high=100):
secret, tries = random.randint(low, high), 0
while True:
tries += 1
result = check_guess(secret, int(input(f"Guess a number {low}-{high}: ")))
print(result)
if result == "correct":
print(f"You won in {tries} tries")
return
print(check_guess(42, 30), check_guess(42, 50), check_guess(42, 42))
# call play() to run the gameOutput: too low too high correct
Starter code: to-do list core
import json
from pathlib import Path
def add_task(tasks, text):
tasks.append({"text": text, "done": False})
def complete_task(tasks, index):
tasks[index]["done"] = True
def save(tasks, path="todo.json"):
Path(path).write_text(json.dumps(tasks, indent=2))
def load(path="todo.json"):
p = Path(path)
return json.loads(p.read_text()) if p.exists() else []
tasks = []
add_task(tasks, "Revise recursion")
add_task(tasks, "Push project to GitHub")
complete_task(tasks, 0)
for i, task in enumerate(tasks, 1):
print(i, "[x]" if task["done"] else "[ ]", task["text"])Output: 1 [x] Revise recursion and 2 [ ] Push project to GitHub. Add argparse for commands and the save and load functions for a real app.
Starter code: expense summary
from collections import defaultdict
expenses = [("food", 180), ("travel", 60), ("food", 220), ("books", 450), ("travel", 40)]
totals = defaultdict(int)
for category, amount in expenses:
totals[category] += amount
for category, total in sorted(totals.items(), key=lambda item: -item[1]):
print(f"{category:<8}{total:>6}")
print("total", sum(totals.values()))Output: books 450, food 400, travel 100, total 950
Turn any idea into a portfolio piece
- Pick one idea and write the one-line goal first.
- Build the smallest version that works end to end.
- Add tests for the rules that could silently break.
- Deploy it so there is a live link or a one-command run.
- Write the README: what it does, how to run it, one number, one limit.
Frequently asked questions
Which Python project should a beginner start with?
A number guessing game or a password generator. Both need only the standard library, and you can finish them in an evening.
How many Python projects do I need for a resume?
Two or three finished projects with a README and a live link or a one-command run beat ten half-finished ones. Include one that uses data or an API.
Where can I find Python projects with source code?
Study maintained open-source repositories on the projects with source code page, then change them: add tests, swap the database or add a feature.
Which Python projects get you a job?
Projects that are deployed, tested and documented: an API with tests, a web app with a database, and a data project with a clear question and a measured result.
Do I need to know a framework before I start?
No. Start with scripts in plain Python, then add Flask or FastAPI when you want a web app.
Learn this with mentors
Programmes for builders and engineers with admissions open: live classes, mentors and project work.


