Python Basics
15 projects
Hands-on projects for Python.
- 1
Number Guessing Game
Build a command-line number guessing game in Python. The computer picks a secret number and the player guesses until they get it right, with higher/lower hints.
Beginner ~15 min - 2
Temperature Converter
Build a set of Python functions to convert between Celsius and Fahrenheit, plus a command-line interface that uses them. Practice functions, parameters, and f-strings.
Beginner ~10 min - 3
Simple Calculator (Python)
Build a command-line calculator in Python that takes two numbers and an operator and prints the result. Practice functions, conditionals, and error handling.
Easy ~20 min - 4
Text Counter
Build a Python script that counts characters, words, and lines in a block of text. Practice string methods, splitting, and len().
Easy ~15 min - 5
Text Processor
Build a Python text processor that cleans, transforms, and analyzes text. Practice string methods, functions, and dictionaries.
Easy ~20 min - 6
Data Analyzer
Build a Python data analyzer that computes statistics on a list of numbers. Practice lists, functions, and the statistics module.
Easy ~20 min - 7
File Manager
Build a Python file manager that lists, searches, and organizes files in a directory. Practice the os module, file handling, and path operations.
Medium ~25 min - 8
Simple Web Scraper
Build a Python web scraper that fetches a web page and extracts links and titles. Practice the urllib and re modules, and string processing.
Medium ~25 min - 9
Todo List Manager
Build a Python todo list manager using classes. Practice OOP, lists, and JSON serialization for saving tasks.
Medium ~25 min - 10
Password Generator
Build a Python password generator with customizable length and character sets. Practice the random, string modules, and functions.
Easy ~15 min - 11
Function Decorators
Write Python decorators that add behavior to functions — timing, logging, and retry. Practice the @ syntax, *args/**kwargs, and functools.wraps.
Medium ~35 min - 12
Generators and Iterators
Build generators with yield, generator expressions, and infinite sequences. Practice lazy evaluation and memory-efficient data processing.
Medium ~30 min - 13
Context Managers
Build context managers with __enter__/__exit__ and the contextlib.contextmanager decorator. Practice resource management and the with statement.
Medium ~35 min - 14
Dataclasses and Named Tuples
Use @dataclass and NamedTuple to model structured data with less boilerplate. Practice field defaults, type hints, and immutability.
Medium ~30 min - 15
Plugin Architecture
Design a plugin system using Python's importlib and entry points. An open-ended project to understand how extensible applications work.
Medium ~50 min