Beginner to Pro · 34 lessons · Free
Python: Zero to Hero
Bite-sized lessons of 5–10 minutes. Run the examples, crush the challenge, stack up XP: one lesson at a time, from beginner to pro.
Python progress0/34 lessons
- MODULE 1
Python Basics
print, variables, data types, input, operators and strings
- 1. Your First Python ProgramShow text on the screen with print() 5 min 20 XP
- 2. Variables: Storing ValuesStore values in variables and use them 7 min 20 XP
- 3. Data Types: Numbers, Text and True/FalseLearn int, float, str, bool and type() 8 min 20 XP
- 4. input(): Asking the UserRead values from the user with input() 8 min 20 XP
- 5. Maths with OperatorsUse + - * / // % ** 7 min 20 XP
- 6. Strings: Playing with Textf-strings, len(), upper(), lower() and indexing 9 min 20 XP
- MODULE 2
Making Decisions: Conditions
if, elif, else and comparisons
- 1. Comparisons: True or False==, !=, >, <, >=, <= and Boolean values 6 min 20 XP
- 2. if / else: Programs that DecideDo one thing if a condition is true, another if not 8 min 25 XP
- 3. elif: More than Two ChoicesCheck several conditions with if, elif and else 8 min 25 XP
- 4. and, or, not: Combining ConditionsJoin several conditions in one if 8 min 25 XP
- 5. if inside if: Nested ConditionsMake a second decision after the first 8 min 30 XP
- MODULE 3
Repeating Things: Loops
for, while, range, break and continue
- 1. for Loops and range()Repeat work a set number of times 9 min 25 XP
- 2. while Loops: Repeat While TrueKeep repeating while a condition is True 8 min 25 XP
- 3. break and continueStop a loop early or skip one round 8 min 30 XP
- 4. Loop Patterns: Totals, Counts and ShapesLoop patterns that interviews love 10 min 35 XP
- MODULE 4
Collections: Lists & Dictionaries
lists, tuples, dictionaries and sets
- 1. Lists: Many Values in One PlaceCreate lists, use indexes, slicing and len() 9 min 25 XP
- 2. List Methods: Add, Remove, Sortappend, insert, remove, pop, sort, sum, max, min 9 min 25 XP
- 3. Tuples: Lists that Don't ChangeCreate tuples, unpack them and swap values 7 min 20 XP
- 4. Dictionaries: Names to ValuesKey-value pairs: read, add, change and loop 10 min 30 XP
- 5. Sets: Unique Values OnlyRemove duplicates, union and intersection 7 min 25 XP
- MODULE 5
Functions: Reusable Code
def, return, default arguments, recursion and lambda
- 1. Functions: Your Own CommandsCreate functions with def and call them 8 min 25 XP
- 2. return: Giving Back an AnswerThe difference between print and return 8 min 30 XP
- 3. Default & Keyword ArgumentsDefault values and arguments by name 8 min 30 XP
- 4. Recursion: Functions that Call ThemselvesBase case and recursive case 10 min 35 XP
- 5. lambda, sorted() and keyTiny functions and custom sorting 9 min 30 XP
- MODULE 6
Practical Python
string methods, comprehensions, error handling, modules and files
- 1. String Methods: split, join, replaceSplit, join, clean and search text 9 min 30 XP
- 2. List Comprehensions: Lists in One LineWrite a loop and an if in one line 8 min 30 XP
- 3. try / except: Handling ErrorsDeal with errors without crashing 9 min 30 XP
- 4. Modules: math, random and MoreUse Python's ready-made tools with import 8 min 30 XP
- 5. Files: Writing and Readingopen(), with, write(), read() and readlines() 9 min 30 XP
- MODULE 7
Object-Oriented Programming (OOP)
classes, objects, methods, inheritance and a mini project
- 1. Classes & Objects: Your Own Data Typesclass, __init__, self and attributes 10 min 35 XP
- 2. Methods: What Objects Can DoFunctions inside a class, and __str__ 10 min 35 XP
- 3. Inheritance: Building on a ClassMake a class from another class, and super() 10 min 35 XP
- 4. Mini Project: Report CardPut everything together in a real program 15 min 50 XP