Getting started with Python

Your first program, comments, and how Python uses indentation.

Python reads almost like English, which is why it is a popular first language. It is used for web back ends, automation, data analysis and machine learning.

Press Run on any example in these lessons. You can edit the code first and see what changes.

Expected output
Vanakkam, Erode!
2 + 3 = 5

Indentation is part of the language

Other languages use braces to group code. Python uses indentation, so the spaces matter. Use four spaces per level.

Expected output
Passed
Well done
Result checked

A line starting with # is a comment. Python ignores it, so use comments to explain why the code does something.

Variables and data types โ†’