Learn Mode course · Beta
Learn Python Inside Your Editor
TL;DR
Contral's Python course is a structured path through Python 3.10+ inside VS Code, Cursor and other editors, or the Contral IDE: 36 topics in 5 categories, an exam at the end of each category, and a CLI Expense Tracker capstone. Your code runs with the Python on your computer, Defense Mode checks you understood each topic, and the Basics category is free.
Beta. The Python course works end to end, but its lessons may still change as we improve them. Java is Learn Mode's stable course.
The Python course at a glance
- Curriculum
- 36 topics in 5 categories
- Exams and project
- 5 category exams + a capstone
- Free plan
- Basics: 10 topics + exam
- You need
- Python 3.10 or later
Python curriculum: 5 categories
Topics unlock in order. The first topic of each category needs the previous category's exam, and the capstone comes after the last exam.
1. Basics
Free10 topics, then a category exam
- Hello, Python: print, comments & running a script
- Variables, names & dynamic typing
- Numbers: int, float, // % ** and round()
- Strings & f-strings
- input() & type conversion
- Booleans, comparisons, if/elif/else & truthiness
- while loops
- for loops & range()
- break, continue & loop else
- match statements (Python 3.10+)
Basics Exam: Arcade Night: one program that uses every Basics concept, from f-strings and input conversion to loops and match with guards.
2. Data Structures
Pro6 topics, then a category exam
- Lists
- Tuples, unpacking, enumerate & zip
- Dictionaries
- Sets
- Comprehensions
- String methods, slicing, split & join
Data Exam: Library Inventory: parse records, de-duplicate with a set, group with a dict of lists and summarise with comprehensions.
3. Functions & Files
Pro8 topics, then a category exam
- Functions, return & docstrings
- Defaults, keyword args, *args & **kwargs
- Scope: LEGB, global & nonlocal
- lambda, sorted(key=), map & filter
- Exceptions: try/except/else/finally & raise
- Modules, imports & __main__
- Files with pathlib & with
- json & csv
Functions Exam: Gradebook Toolkit: a small importable module that parses input with exceptions, sorts with key functions, reads a text file and writes JSON.
4. Pythonic OOP
Pro8 topics, then a category exam
- Classes & objects
- Inheritance & super()
- Dunder methods: __str__, __repr__, __eq__, __len__
- dataclasses & enum
- Iterators & generators (yield)
- Decorators
- Context managers
- Type hints & typing
OOP Exam: Parcel Tracker: an enum and dataclasses, state changes guarded by exceptions, inheritance, a generator method, a property and type hints.
5. The Python Toolbox
Pro4 topics, then a category exam and the capstone
- collections, itertools & datetime
- Testing with unittest & assert
- venv & pip
- asyncio basics
Toolbox Exam: Log Analyzer: generators, Counter and defaultdict, datetime parsing and an asyncio fan-in of several log sources.
Capstone: CLI Expense Tracker: a real command-line app built one module per step (data model, JSON storage, reports, the command-line interface), checked by tests and finished with a scripted end-to-end session.
How a Python topic works
- 1Theory
The concept, explained.
- 2Observe
Working example code to read.
- 3Do
You write code in a practice file in your workspace.
- 4Debug
You fix broken code.
- 5Explain
You explain the code in your own words. Defense Mode grades the answer.
- 6Boss
A final challenge for the topic.
Your code runs for real. Learn Mode finds Python 3.10+ on your computer (python3, python, or py on Windows), runs your code and checks its output and tests. If the tool is missing or too old, a banner shows How to install and Re-check. You can keep going in the meantime: your code is checked without running it and the result is marked Checked without running.
Defense Mode is part of every topic. It grades your Explain answers, runs a short concept check when you complete a topic, and Defend this on Do, Debug and Boss steps starts a round on your own practice code. See Defense Mode.
Topics unlock in order, and each category ends in an exam. Progress is kept separately for each language, so switching courses never resets anything.
What's free and what's Pro
Free plan
The Basics category: 10 topics, from print() to match statements, plus the Arcade Night exam.
Topics you've already started or finished stay open on the Free plan.
Pro, Pro+, Teams and all AppSumo tiers
Every category: Data Structures, Functions & Files, Pythonic OOP and The Python Toolbox, their exams, and the CLI Expense Tracker capstone.
Where you can take the course
Contral extension
Works in VS Code, Cursor, Windsurf, Antigravity, Kilo Code and VSCodium. Run Contral: Start Learning a Language from the Command Palette, or type /learn in the Contral chat.
Contral IDE
A desktop editor with Contral built in, in public beta. Use the Build/Learn toggle at the top of the Contral panel, or type /learn.
Already writing Python with an AI agent? Build Mode and teaching cards work in any Python project, not just the course. See the guide to learning Python inside your IDE.
Start the Python Basics for free
Install the extension or the desktop IDE, pick Python in Learn Mode, and start at topic 1. Upgrade to Pro when you want the rest of the course.
Python course FAQ
What does the Contral Python course cover?
36 topics in five categories: Basics, Data Structures, Functions & Files, Pythonic OOP and The Python Toolbox. Each category ends in an exam, and the course finishes with a capstone project, a CLI Expense Tracker. It goes from print() and f-strings through comprehensions, exceptions, files, dataclasses, generators, decorators, type hints, unittest, venv and asyncio basics.
Is the Python course free?
The Basics category is free on the Free plan: 10 topics plus the Basics exam. Topics you've already started stay open. Pro, Pro+, Teams and all AppSumo tiers include every category, the other exams and the capstone. On the Free plan, AI explanations inside lessons count toward your 5 code explanations per day.
Which Python version do I need?
Python 3.10 or later, because the course teaches match statements. Contral looks for python3, python, or py on Windows. If Python is missing or too old, Learn Mode shows How to install and Re-check, and until then your code is checked without running it and marked Checked without running.
Does my Python code actually run?
Yes. Learn Mode runs your code with the Python interpreter on your computer and checks its output and tests. Practice files are created in your workspace under .contral/learn/.
Is the Python course finished?
It's in beta. The course works end to end, but lessons may still change as we improve them. Java is the stable Learn Mode course.
Where can I take the course?
In the Contral extension for VS Code, Cursor, Windsurf, Antigravity, Kilo Code and VSCodium, and in the Contral IDE desktop app. Run Contral: Start Learning a Language, or type /learn, and pick Python.
How does Contral check that I understood a topic?
Defense Mode is part of every topic. It grades your answer on the Explain step, runs a short concept check when you complete the topic, and lets you start a Defend this round on your own practice code.