1. Start with Python
BeginnerMeet Python, run simple instructions, and understand the values that programs work with.
Instructions, output, and comments
A program is a sequence of instructions Python reads and runs.
Values, types, and variables
Names let you keep and reuse values in a program.
Input and conversion
Turn user input into the type your calculation needs.
Module checkpoint: Try it: collect a name and two numeric values, convert the numbers, and print their sum with a sentence.
2. Make decisions and repeat work
BeginnerControl which instructions run and repeat a task without copying the same code.
Conditions and branches
Boolean expressions let a program choose a path.
Repeat with for
A for loop visits values from a sequence one at a time.
Repeat with while
A while loop continues as long as its condition stays true.
Module checkpoint: Try it: write the decision steps for a score-based result, then repeat a short message a chosen number of times.
3. Organize data and reusable code
BeginnerWork with collections, define functions, and handle expected errors clearly.
Lists, dictionaries, and sets
Collections group values so your program can work with related data.
Functions and return values
Functions package work behind a name and a clear interface.
Debugging and exceptions
Use errors as clues and handle expected failure cases.
Module checkpoint: Try it: write a function that accepts a list, returns a useful summary, and handles an empty list deliberately.
4. Build reliable programs
IntermediateSplit programs into modules, write tests, and process files safely.
Modules and imports
Modules help divide a program into reusable files and tools.
Test behavior with small checks
Tests make expected behavior repeatable and safer to change.
Work with text files
Context managers reliably close files after use.
Module checkpoint: Try it: make a tiny module with one reusable function and add at least two expected-result checks.
5. Model richer data
IntermediateUse comprehensions, classes, and clear object boundaries to represent a problem.
Transform data with comprehensions
Comprehensions create a collection from a readable expression.
Classes and instances
A class describes a kind of object and the behavior it offers.
Choose data structures
The right structure makes common operations clearer.
Module checkpoint: Try it: model one concept from your daily life with a class, then explain why a dictionary or list stores the surrounding records.
6. Think in algorithms
AdvancedAnalyze cost, use iteration patterns, and combine your skills into a maintainable project.
Reason about algorithm cost
Complexity describes how resource use grows as input grows.
Iterators and generators
Generators produce values as needed instead of building them all at once.
Plan, build, and refine
A reliable project grows from a small working version.
Module checkpoint: Review your final project against its brief, tests, error handling, and instructions before calling it done.