Completed
Available
Locked · open anytime

Level 1: Beginner Python Exercises

New to programming? Start here. Level 1 takes you from your very first line of Python to writing small programs with functions, loops, lists, dictionaries and classes — the building blocks every Python developer uses daily.

Each exercise teaches one idea with a short example, then asks you to write a small piece of code yourself. Automatic tests check your answer the moment you click Run Tests, so you always know whether you've got it right.

How to use this roadmap: begin with Print & Variables at the top of the graph. Every exercise you pass unlocks the topics that build on it, so you can follow your own path while never missing a prerequisite.

The 11 exercises in this level

  1. 1 Print & Variables Python foundations Write your first lines of Python: show text on the screen with print() and store values in variables. Start here — no prerequisites
  2. 2 Control Flow Conditionals & branching Direct program execution with conditional statements. Build decision trees using boolean logic. Recommended first: Print & Variables
  3. 3 Functions & Scope Modular, reusable code Encapsulate logic into reusable functions with parameters, return values, and well-defined scope. Recommended first: Print & Variables
  4. 4 List Comprehensions Pythonic iteration Master concise list creation syntax — filter and transform sequences in a single readable expression. Recommended first: Control Flow, Functions & Scope
  5. 5 Modules & Libraries Python ecosystem Import Python's Standard Library to solve real-world tasks without reinventing the wheel. Recommended first: Functions & Scope
  6. 6 OOP & Classes Objects & encapsulation Model your program around objects that bundle state and behaviour into reusable, modular classes. Recommended first: List Comprehensions, Modules & Libraries
  7. 7 Dicts, Sets & Tuples Advanced data structures Leverage Python's hash maps, unique sets, and immutable tuples for efficient, expressive algorithms. Recommended first: List Comprehensions, OOP & Classes
  8. 8 Numbers & Math Operators that do the counting Do everyday maths in Python: + - * /, whole-number division with // and the remainder with %. Recommended first: Functions & Scope
  9. 9 Text & f-strings Build text from values Change the case of text and build new text from variables with f-strings. Recommended first: Functions & Scope
  10. 10 Lists Many values in one variable Keep many values in order with a list, read items by position and count them with len(). Recommended first: Functions & Scope
  11. 11 Loops Repeat for every item Repeat code for every item of a list with a for loop and add up a total step by step. Recommended first: Control Flow, Lists

Frequently asked questions

Do I need to install Python to do these exercises?
No. A full Python interpreter runs directly in your browser, so you can write and test code on any computer with a modern browser — nothing to install and no account to create.
I have never programmed before. Is Level 1 right for me?
Yes. Level 1 assumes no prior experience. The first exercise only asks you to store a value in a variable and print a message, and each topic builds gently on the previous one.
How long does Level 1 take?
Most learners finish an exercise in 5 to 20 minutes, so the whole level fits into a few short sessions. Your progress is saved in your browser, so you can stop and continue whenever you like.
What should I do if my code doesn't pass the tests?
Read the error message in the output panel — it usually names the line and the problem. Compare your code with the example in the lesson, check the comments in the starter code, and use Reset to start again from the original code.