Skip to content
PractiCode Learn

Python Programming

Start from zero, with real Python running right in your browser. Print, calculate, decide, loop and organise your code, then read files, write classes and test what you build.

  • 12 modules, 75 lessons
  • About 60 hours
  • 12 projects and a capstone
  • Module 1 is open now, and free

Aligned to the Python Institute’s PCEP and PCAP · Lessons save for offline

Module 1 is open. The other modules are being written and reviewed by our instructors, and each one opens as it’s ready.

By the end, you’ll be able to

  • Explain what a program is, run Python code, and read Python's error messages to fix your own mistakes.
  • Store and change data with variables, numbers, strings, lists, tuples, dictionaries and sets.
  • Control a program with decisions and loops.
  • Break a problem into functions with clear parameters and return values.
  • Read and write files, including CSV and JSON, and handle errors with exceptions.
  • Organise code into modules and packages, and use the standard library and packages from PyPI.
  • Model real things with classes and objects.
  • Write readable, tested Python that follows PEP 8.
  • Use Python for real work: automating tasks, calling web APIs and a first look at data with pandas.

The syllabus

Tap a module to see its lessons

1Getting started with Python6 lessons · about 1 hourFree

What a program is, your first lines of Python, reading errors, variables, maths and text.

  1. What a program is
  2. Your first program: print
  3. Errors are messages
  4. Variables
  5. Numbers and maths
  6. Strings and f-strings
Module projectModule check

Project: A receipt printer for a market stall

2Making decisions6 lessons plannedComing soon

Programs that choose: comparisons, if and elif, combined conditions and user input.

  1. True, False and comparisons
  2. if, elif and else
  3. and, or and not
  4. Nested decisions
  5. Input from the user
  6. Debugging decisions
Module projectModule check

Project: A quiz that marks itself

3Loops6 lessons plannedComing soon

Do it again: for and while loops, range, break and continue, and patterns.

  1. Why loops
  2. for loops and range
  3. while loops
  4. break and continue
  5. Loops with conditions
  6. Patterns with loops
Module projectModule check

Project: A times-table and pattern printer

4Lists and tuples7 lessons plannedComing soon

Keep many values in order: lists, slicing, comprehensions, tuples and sorting.

  1. Lists
  2. Indexing and slicing
  3. Changing lists
  4. Looping over lists
  5. List comprehensions
  6. Tuples
  7. Sorting and searching
Module projectModule check

Project: A to-do list manager

5Functions7 lessons plannedComing soon

Break problems into named pieces with parameters, return values and tests.

  1. Why functions
  2. Parameters and return
  3. Default and keyword arguments
  4. Scope
  5. Functions calling functions
  6. Docstrings and readable code
  7. Testing a function
Module projectModule check

Project: A unit converter built from functions

6Dictionaries and sets6 lessons plannedComing soon

Look things up by name with dictionaries, keep unique values with sets, and read JSON.

  1. Dictionaries
  2. Looping over dictionaries
  3. Nested data
  4. Sets
  5. Choosing the right collection
  6. JSON and Python
Module projectModule check

Project: A contacts book

7Strings and text6 lessons plannedComing soon

Work with text: methods, splitting, formatting, searching and a first regular expression.

  1. String methods
  2. Splitting and joining
  3. Formatting output
  4. Searching text
  5. Unicode and encodings
  6. Regular expressions: a first look
Module projectModule check

Project: A text analyser: word counts and the longest word

8Files and errors6 lessons plannedComing soon

Read and write files and CSVs, and handle errors without crashing.

  1. Reading files
  2. Writing files
  3. CSV files
  4. Exceptions
  5. try, except and finally
  6. Raising your own errors
Module projectModule check

Project: A grade report from a CSV file

9Modules and packages6 lessons plannedComing soon

Organise code into modules, use the standard library, and install packages with pip.

  1. Importing modules
  2. The standard library
  3. Writing your own module
  4. Packages
  5. pip and virtual environments
  6. Reading documentation
Module projectModule check

Project: Your own module, used by a small app

10Objects and classes7 lessons plannedComing soon

Model real things with classes, attributes, methods and inheritance.

  1. Objects everywhere
  2. Classes and instances
  3. Methods
  4. Attributes and __init__
  5. Inheritance
  6. Special methods
  7. When to use classes
Module projectModule check

Project: A bank account class with deposits and withdrawals

11Writing good code6 lessons plannedComing soon

Readable, tested code: PEP 8, pytest, debugging, type hints and refactoring.

  1. PEP 8 and style
  2. Testing with pytest
  3. Debugging tools
  4. Type hints
  5. Refactoring
  6. Version control for Python
Module projectModule check

Project: Clean up and test a messy program

12Real-world Python6 lessons plannedComing soon

Python at work: dates, automation, web APIs, a first look at pandas, and command-line tools.

  1. Working with dates
  2. Automating tasks
  3. Calling web APIs
  4. Data with pandas: a first look
  5. Command-line programs
  6. Where to go next
Module projectModule check

Project: An automation script for a real chore

Some of what you’ll build

  • Module 5 · Coming soon

    A unit converter built from functions

  • Module 8 · Coming soon

    A grade report from a CSV file

  • Module 12 · Coming soon

    An automation script for a real chore

Module 1 takes about an hour. It’s free.

Start Module 1 Free