30 Days
Python Challenge
Learn the concept. Trace the code. Build something you can explain.
Start with everyday Python, then progress through collections, files, objects, and useful tools. Finish three runnable projects and a study-data capstone. Plan for 90–120 minutes a day; repeat a day whenever you need more practice.
Saved in this browser on this device.
All 30 checkpoints completed. Keep your code, fixtures, and tests as evidence of your work.
What makes a day complete?
Each lesson has objectives, a worked example, a trace table, guided practice, a practical challenge, a reference solution, and a five-question knowledge check. A score of at least 85% is required; with five equally weighted questions, this means all five answers must be correct. Complete the practical self-review before saving the day.
These controls check your knowledge answers and record your self-review. They do not execute your code or provide independent certification. You can browse every day freely. Clear this site's browser data to remove saved reading progress.
Starting point: use a Python interpreter you already have available. Day 01 focuses on execution and debugging. Examples use Python 3.12; Day 26 also uses Beautiful Soup 4.14.3. The password project uses secrets, and the OOP lessons explain Python's actual method behavior.
Run and reason
Read programs, handle values, and control execution.
- 01○
Your first Python program
Run a script, trace expressions, interpret output, and repair your first error.
- 02○
Variables and data types
Use names deliberately, distinguish numeric values from text, and track reassignment.
- 03○
Input, output, and formatting
Convert user input explicitly and produce a clear report without changing the underlying data.
- 04○
Operators and expressions
Calculate totals, compare values, and distinguish equality, identity, and membership.
- 05○
Conditional statements
Translate written rules into mutually understandable branches and test their boundaries.
- 06○
Loops and control flow
Use for and while loops, accumulate results, and explain when break and continue run.
Functions and collections
Choose data structures and return useful results.
- 07○
Functions and small tests
Write explicit function contracts, return results, and test normal and edge cases.
- 08○
Lists and mutation
Index, slice, append, and copy lists while understanding aliasing and in-place changes.
- 09○
Tuples and unpacking
Represent fixed-position records and return several results with deliberate unpacking.
- 10○
Dictionaries and records
Store named fields, update values, and distinguish a missing key from a known zero.
- 11○
Sets and relationships
Deduplicate values and compare collections through union, intersection, and difference.
- 12○
String indexing, slicing, and methods
Prepare text with an explicit policy and avoid confusing characters, words, and identifiers.
Transform and organize
Prepare text, save files, handle failures, and split modules.
- 13○
Strings, escapes, and formatted reports
Read escaped text, use raw strings accurately, and build reports from separate data fields.
- 14○
List comprehensions
Rewrite a clear transformation as a comprehension and keep selection separate from formatting.
- 15○
Dictionary comprehensions
Build mappings, audit duplicate keys, and choose collision policies instead of silently losing records.
- 16○
Files and context managers
Read and write local text with explicit encoding, predictable modes, and reliable closing.
- 17○
Exceptions and validation
Handle known failures, raise useful errors, and preserve evidence of unexpected bugs.
- 18○
Modules and packages
Split responsibilities into importable files and keep reusable logic separate from script startup.
Objects and useful tools
Model state, share behavior, and work with time and patterns.
- 19○
Classes, objects, and methods
Represent a small domain object and connect its state to behavior without unnecessary abstraction.
- 20○
Initialization and instance state
Initialize valid objects and prevent shared mutable class attributes from leaking between instances.
- 21○
Inheritance and composition
Reuse behavior with a simple inheritance chain and choose composition when the relationship is different.
- 22○
Polymorphism and method overriding
Let objects share an interface and distinguish overriding from Python operator overloading.
- 23○
Dates, times, and durations
Parse dates, calculate intervals, and distinguish calendar labels from timezone-aware instants.
- 24○
Regular expressions
Match structured text with bounded patterns and test captures, substitutions, and near misses.
Build and demonstrate
Use structured data and complete three projects and a capstone.
- 25○
Working with JSON
Serialize ordinary data, validate the loaded shape, and reject malformed or misleading values.
- 26○
Web scraping with an offline fixture
Extract structured records from HTML using Beautiful Soup and report missing fields explicitly.
- 27○
Project: a persistent to-do application
Combine lists, dictionaries, validation, and JSON persistence into a tested command-line task manager.
- 28○
Project: a password generator
Build a generator with secrets, explicit length rules, and tests that verify properties instead of exact outputs.
- 29○
Project: rock, paper, scissors
Separate game rules from random choice and presentation, then test every outcome deterministically.
- 30○
Revision, capstone, and next steps
Demonstrate the complete workflow with a small project, a test matrix, and an honest explanation of its limits.