Kestrel Exams kestrel logo KESTREL EXAMSPRACTICE TO PASS
HomeCourses & exams › Python
Academic & Test Prep

Python, the way a first course teaches it

The first programming course most people meet, and the one where a wrong idea can sit undetected for weeks because the program still runs. These guides go after those ideas directly.

18 topics mapped Every listing executed Free, no account Practice app in progress Read the guides

What this Python material is for

A first programming course has a peculiar difficulty: the feedback is unreliable. In most subjects a wrong answer is marked wrong. In programming, a wrong idea often produces a program that runs perfectly and quietly gives the wrong result — and you find out three weeks later, on an exam, in a question you have no idea how to approach.

So these guides are not organized around syntax you can look up. They are organized around the specific places where a beginner's mental model and Python's actual behaviour come apart: assignment that does not copy, division that discards a remainder, a method that sorts your list and hands you back None, a loop variable that is not what you think it is. Each one gets its own explanation, its own worked examples, and the exact error message Python produces when it goes wrong.

Who this is for

Every code listing is executed

This is worth stating plainly, because it is unusual. Every code block on a Kestrel Python guide, and every line of output beneath it — including the tracebacks — was run as a standalone program against CPython 3.11 before the page was published. Not typed from memory, not adapted from somewhere else, not "should print". If a guide shows you output, that output came out of an interpreter.

Guides that have passed this check carry a Code verified badge in their header. The check is automated and it is run again whenever a page changes.

The topics being covered

Eighteen sections, in the order a first course actually teaches them — which is not the order a reference manual would use. Debugging arrives before loops, because that is when you start needing it. Drawing arrives before data, because it makes repetition visible.

Vocabulary & how Python runspractice only
Variables, data types & printingguide planned
Input, conversion & operator precedenceguide planned
Flowcharts & program designpractice only
Errors & debuggingguide planned
Turtle graphicspractice only
for loops & rangeguide published
Modules — math, random, your ownpractice only
Functions, parameters & return valuesguide published
Scope, lifetime & testing with assertguide published
Booleans & conditionalsguide published
while loops, sentinels & input validationguide published
Strings — indexing, slicing, immutabilityguide published
String methods & f-stringsguide published
Lists, tuples & aliasingguide published
Dictionariesguide published
List & dictionary patternspractice only
Files & exceptionsguide published

Bar widths show the intended share of practice questions once the bank is written; they are not course-grade weights and they are not question counts. Guides are published as they are finished rather than held back for one launch. “Practice only” means that section is planned for the question bank but is not getting a written guide — nine guides are planned in total, and they do not map one-to-one onto the eighteen sections.

Start here

If you only read one, read Why changing one list changed the other. It covers the single idea a first Python course tests hardest and beginners get wrong most silently — y = x does not copy a list. It also covers what does copy, why the same line is harmless for numbers and strings, and why .sort() hands you back None.

About the practice app

Every other Kestrel subject has a free, offline practice app with topic-selectable questions and an explanation for every answer choice. Python will have one too. It does not yet, because the question bank is still being written, and there is nothing here that pretends otherwise — no greyed-out button, no countdown, no email capture. When it works, it will appear on this page and in the app list.

In the meantime the guides stand on their own. They are the part of the material that explains; the app is the part that tests.

Frequently asked questions

Is the Python material free?

Yes. The study guides are free, need no account, and there is nothing to sign up for.

Is there a Python practice app yet?

Not yet. The study guides are being published first, and the practice question bank is being written. Every other Kestrel subject has an app, and Python will too — but nothing is advertised here before it works.

Do I need to already know how to program?

No. The material starts where a first course starts — what a variable is, how input becomes a number, what an error message is telling you — and builds up to lists, dictionaries, files and exceptions.

Is the code on these pages tested?

Yes. Every code listing and every line of output shown in a Python guide is executed against CPython 3.11 before publication, including the error messages. A guide carrying the Code verified badge has had each of its listings run as a standalone program.

Is this tied to one school, instructor, or section?

No. The material is written for a general first-course audience and focuses on transferable Python fundamentals.

Kestrel Exams Python material is independent study practice. Guides and explanations are original and AI-generated, reviewed for accuracy, with every code listing executed against CPython 3.11 before publication.

Read the Python guides