Skip to content
Beginner · Course

Python Basics

A hands-on first course in Python 3. You'll learn how Python reads your code, how to store and convert values, build expressions, make decisions with if, repeat work with loops, and package code into functions. Each Topic is a short reading with examples and common mistakes, followed by practice games: pass any one of them to unlock the next Topic.

Start learning
About 118 min reading 6 TopicsDiveApogeeLeapPairsBlitz

Topics

Read a Topic, then pass any one of its practice games to unlock the next. Practice is open as soon as a Topic unlocks.

  1. Write your first program and learn how Python reads lines, comments and indented blocks.

    • Dive
    • Apogee
    • Leap
    • Pairs
    • Blitz
  2. Store values in named variables and learn Python's basic types and how to convert between them.

    • Dive
    • Apogee
    • Leap
    • Pairs
    • Blitz
  3. Do maths, compare values, combine conditions and build strings with Python's operators.

    • Dive
    • Apogee
    • Leap
    • Pairs
    • Blitz
  4. Make decisions with if, elif and else, truthy and falsy values, and chained comparisons.

    • Dive
    • Apogee
    • Leap
    • Pairs
    • Blitz
  5. Repeat work with for and while, count with range(), and steer loops with break and continue.

    • Dive
    • Apogee
    • Leap
    • Pairs
    • Blitz
  6. Package code into reusable functions with def, pass arguments, return values and understand scope.

    • Dive
    • Apogee
    • Leap
    • Pairs
    • Blitz