Course 2 · Python Basics Free to read
Python from Zero tutorial
Seven stages from your first print() to your own functions, ending with a graduation challenge.
14 lessonsabout 14 h
Then continue with: Data Structures and Algorithms, Computer Networks, Operating Systems, Backend Development, Software Testing, Cyber Security Basics, AI Foundations, System Design
Learn it by doing
The interactive course has the same lessons with an editor next to them: run every example, answer the quizzes and solve exercises that are checked the moment you submit. Free to start, no sign-up.
Start the interactive course1
1
print() and calculationsHow do you make Python show something, and how does it calculate?2
Reading error messagesWhat do you do when Python says something is wrong?
Hello, Python
Print, calculate and read error messages.2
3
VariablesHow does a program remember things?4
Types and input()Why does "3" + "4" give 34, and how do you read what the user types?
Variables and types
Remember values and read what the user types.3
5
Indexing and slicingHow do you get a single letter, or a piece, out of a string?6
String methods and f-stringsHow do you change, search and format text easily?
Strings
Work with text.4
7
if and elseHow does a program choose between two paths?8
elif, and, or, notWhat if there are more than two choices, or several conditions at once?
Decisions
Make the program choose.5
9
for and range()How do you repeat code for a range of numbers, or for each letter?10
while loopsHow do you loop until something happens, when you can't know the count in advance?