Every Python challenge is a card. Solve it, and it turns holo.

Write real Python in your browser, watch the tests light up one by one, and fill your binder from Initiate to Legend. Free, nothing to install.

Filter List Elements

130 XP
ListsHacker

Write filter_positive() to keep only the numbers above zero.

2 tests15 min

Sum with Loop

115 XP
LoopsHacker

Add the numbers from 1 to 10 with a for loop and print the total.

2 tests12 min

Fibonacci Recursive

240 XP
AlgorithmsElite

Return the nth Fibonacci number by calling the function from itself.

Won. 2 tests25 min

How a card is won

One challenge, three moments. You only ever need your browser.

  1. Read the brief

    Each card states what to build, what it is worth, and roughly how long it takes.

  2. Write the Python

    A real editor and a real Python run right in the page. Hints are there when you are stuck.

  3. Pass the tests

    The tests light up one by one. When the last one passes, the card turns holo and the XP is yours.

Sum with Loop
total = 0
for i in range(1, 11):
    total = total + i
print(total)
  • assert total == 55
  • prints 55

2 of 2 tests passed

Card won: +115 XP

Difficulty is rarity

Four tiers, from your first variable to recursion. The harder the card, the more ink its foil spends.

  • Variable Assignment

    55 XP
    VariablesInitiate

    Store the name 'Alice' in a variable and print it.

    Won. 3 tests5 min

    Initiate

    Silver foil. Your first variables, prints and ifs.

  • Filter List Elements

    130 XP
    ListsHacker

    Write filter_positive() to keep only the numbers above zero.

    Won. 2 tests15 min

    Hacker

    Cyan foil. Loops, lists and your own functions.

  • Fibonacci Recursive

    240 XP
    AlgorithmsElite

    Return the nth Fibonacci number by calling the function from itself.

    Won. 2 tests25 min

    Elite

    Two inks. Algorithms, recursion and dictionaries.

  • Set for Membership Testing

    362 XP
    AlgorithmsLegend

    Turn a list of 1,000 numbers into a set and test membership fast.

    Won. 2 tests30 min

    Legend

    Three inks and a gold edge. The hardest cards in the deck.

Duel a ghost

Pick a card someone has already won and race their recorded time. Nobody has to be online, and losing costs you nothing.

Filter List Elements

130 XP
ListsHacker

Write filter_positive() to keep only the numbers above zero.

Won. 2 tests15 min

You

Your time: 1:42

Filter List Elements

130 XP
ListsHacker

Write filter_positive() to keep only the numbers above zero.

2 tests15 min

Ghost

Ghost's time: 1:58

16 s aheadExample times

Nine paths, one card at a time

Prefer a guided route? Each learning path is a numbered column of challenges. Leave whenever you like and pick it up from the same step.

  1. Python Basics
  2. Variables & Operations
  3. Fix the Code
  4. Control Flow
  5. Functions & Modularity
  6. Data Structures
  7. Object-Oriented Programming
  8. Algorithms & Problem Solving
  9. Advanced Python

Your binder is empty. Let's fix that.

Open your first pack and win a card in a few minutes.

A binder page: nine empty sleeves