Skip to content
Learn at your own pace

Learn Python

Learn clear, practical Python for everyday automation, working with data and building small applications.

A student connects colorful building blocks beside a laptop, illustrating a sequence of programming instructions.
One small step becomes a working program.
24lessons in 6 stages
48practice exercises
24project milestones
96quiz questions
96review cards

A clear place to start

Python lets you describe a task as a sequence of instructions. It is useful for automating repeated work, reading files, and turning data into reports.

What you need first

No previous programming language is required. You should be able to create a folder, save a text file, and open a terminal. Work through the starter example before the first project-setup lesson.

Start with these ideas

  1. A variable names a value: score = 10. A string stores text, while a list stores a sequence of values.
  2. An if condition chooses what happens next. A for loop repeats work for each item, such as every mark in a list.
  3. A function groups reusable instructions. Give it inputs, return a result, and try one normal and one invalid input.

Connect it to a real project

Build a student expense summary in small steps: store a few expenses, calculate category totals, read a file, then validate and test the report.

Study one concept at a time. Explain its everyday example in your own words, predict the worked example’s result, then try a small change. Use practice and quiz feedback to decide what to revisit. You can spread a lesson across several study sessions.

Set up your environment Tools, setup steps, and completion requirements

Start with the ideas above, then set up the tools below. Return to the starter example whenever a new term feels unfamiliar.

text
python3 --version
python3 -m venv .venv
# macOS/Linux:
source .venv/bin/activate
# Windows PowerShell: .venv\Scripts\Activate.ps1
python -m pip --version
python lesson.py
python -m unittest discover
# Record the supported Python version and lock application dependencies.

A free account saves your progress, notes, exercise evidence and spaced review cards. To complete a lesson, score at least 80% on its quiz, finish both exercises and the project checklist, and submit your project link with a reflection. Project evidence is self-reported; use the final portfolio rubrics to seek an independent code review.

Your Python learning path

Work through these foundations in order, then bring them together in a project.

24 of 24 lessons · follow the stages in order

Start with a small example

Save this in a .py file and run it with your Python interpreter. enumerate provides a number for each topic, starting at one.

topics = ["Functions", "Files", "Testing"]

for number, topic in enumerate(topics, start=1):
    print(f"{number}. Learn {topic}")

Try it yourself

Move the loop into a function that accepts any list of topics and returns the formatted lines.

Put it into practice

Build a CSV expense summary

Turn a small data file into a useful report.

  1. Read a CSV file containing a category and an amount.
  2. Validate each row and report invalid amounts.
  3. Group totals by category using decimal arithmetic for money.
  4. Write the summary to a file and test empty and malformed input.
Keep exploring

Find your next course

Choose a language, build on it with a framework, or explore AI and search.

Showing 6 of 17 courses