Programming
Python from Zero: variables, types, if / elif / else and loops for beginners
For adults who have never programmed: read short Python programs, work out what they print and choose fixes for common mistakes with variables, if / elif / else and loops. You type or pick each answer; the app does not run code.
3 lessons, 18 steps
Learn to read code before you write it
Python from Zero is a first step into programming for adults who have never written a line of code. Every step shows a short program, about coins in a game, a café bill or a cinema ticket, and asks what it does. Reading and tracing code line by line is the skill the course practices.
Lesson one covers values, variables and types: what the = sign really does, why b keeps its value when a changes later, the difference between int, float and str, and why adding a number to text in quotes stops the program with a TypeError. Lesson two is about comparisons and decisions: True and False, == against =, and which branch of an if / elif / else chain runs. Lesson three covers for and while loops: which numbers range() gives, counting and adding up inside a loop, a range that stops one number too early and a loop that never ends.
Each lesson opens with a short explanation and then gives you six steps. You type what a program prints or the value a variable ends with, pick the change that fixes a bug, put lines in the right order or explain a fix in a sentence or two. The app does not run code: you trace each program in your head or on paper. When your answer is wrong, the AI tutor asks a question that points at the mistake, then gives a hint, then a partial step. Show solution is always available, and a short quiz before and after each lesson shows what changed.
This is one of the editorial courses in Ai Teacher. The problems and worked solutions were written in advance, and facts and definitions were checked against the public sources listed below. Functions, input and files are not part of these three lessons.
What the lessons cover
- Follow a variable as its value changes and say what a short program prints
- Tell int, float and str values apart and fix a program that adds text to a number
- Say whether a comparison is True or False and which branch of an if / elif / else chain runs
- Trace for and while loops that count or add up, including where range() stops
- Spot common slips: = in place of ==, a name with the wrong capital letter, a range that stops too early and a loop that never ends
Lessons
Values, variables and types
Making decisions: comparisons and if / elif / else
Repeating work: for and while loops
A variables step from lesson 1

Tutor: Read the program: a = 6, then b = a + 1, then a = 10. What value does b hold after the last line?
You: 11

Tutor: The last line says a = 10. Does it say anything about b?
You: No. b got 6 + 1 when the second line ran, so b is still 7.

Tutor: Right, 7. An assignment stores the result at that moment; giving a a new value later does not change b.
Who this Python course is for
- You have never programmed and want to see what code is like before you start a longer course.
- You work with developers or analysts and want to read a simple script without guessing.
- You started a Python tutorial and got stuck on why a value changed or a loop ran one time too few.
- You want to practice on your phone, without installing Python.
Questions about Python from Zero
Do I need to install Python?
No. The lessons run in the Ai Teacher app, and the app does not run code. You read each program on screen and type or pick your answer, so all you need is the app.
How is this different from the Non-Programmer's Tutorial course?
Both are for beginners. Non-Programmer's Tutorial for Python 3 was built automatically from chapters of a Wikibooks textbook and was not reviewed by a person; it includes input() and work with text. Python from Zero is an editorial course with problems written in advance, and it spends its three lessons on variables and types, decisions, and for and while loops.
Is the course free?
One lesson in Ai Teacher is free. After that, a subscription opens all lessons. You can pay monthly or yearly in Google Play, and usage limits apply.
Sources
Facts and definitions were checked against these public sources. Lesson text and examples were written independently; no text was adapted.
- Non-Programmer's Tutorial for Python 3/Who Goes There?
- Non-Programmer's Tutorial for Python 3/Count to 10
- Assignment (computer science)
- Python (programming language)
- Python syntax and semantics
- Boolean data type
- Python for Everybody, lecture slides: Variables, Expressions, and Statements (Chapter 2)
- Non-Programmer's Tutorial for Python 3/Decisions
- Conditional (computer programming)
- Python for Everybody, lecture slides: Conditional Execution (Chapter 3)
- Loop (statement)
- Off-by-one error
- Non-Programmer's Tutorial for Python 3/For Loops
- Python for Everybody, lecture slides: Loops and Iteration (Chapter 5)
Related courses
- Programming Open textbook
Non-Programmer's Tutorial for Python 3
Built automatically from three early chapters of the open textbook "Non-Programmer's Tutorial for Python 3" on Wikibooks: input and variables, while loops and decisions. Not reviewed by a person.
From Wikibooks, 3 lessons - Programming Open textbook
JavaScript
Built automatically from early chapters of the open textbook "JavaScript" on Wikibooks: JavaScript in HTML, syntax, lexical structure, dates and arrays. Not reviewed by a person.
From Wikibooks, 3 lessons - Programming Open textbook
C programming
Built automatically from the first chapters of the open textbook "C programming" on Wikibooks: why C, its history, the first program and how it is built, printf, variables and scanf. Not reviewed by a person.
From Wikibooks, 3 lessons - Technology
AI for Everyone: Use It Well
How AI tools that write text actually work, for people without a technical background: what a language model does, why its answers can be wrong and how to check them.
3 lessons, 18 steps