With Python installed and an editor ready, it's time to actually write some. This module covers the small set of rules and building blocks that every Python program is made of, so you can read and write basic scripts confidently before moving on to anything more complex.
It starts with Python's syntax — indentation, comments, and statements — since Python uses whitespace instead of braces to define code blocks, and getting this right early saves a lot of confusion later. From there it covers variables and data types: integers, floats, strings, and booleans, and how Python decides a variable's type for you. It continues with operators — arithmetic, comparison, and logical — for doing calculations and making comparisons, and closes with f-strings, the modern way to build strings out of variables and expressions.
Watch the lessons in order, then continue on to Data Structures.
How Python code is structured, why indentation is critical for defining blocks, and how to write comments that explain your code.
How to declare variables, Python's core data types, and the naming rules that keep your code readable.
Doing calculations and making comparisons with Python's arithmetic, comparison, and logical operators, with worked examples of each.
Using f-strings to build strings out of variables and expressions — the modern, readable way to format text in Python.