Part 1: Getting started¶
This part covers what a program is, how to run Python, how to show and read values, and how to read the errors Python reports. Work through the lessons in order, because each one uses the ideas of the lessons before it.
Python version and error messages
The code and the error messages in this course were tested on Python 3.12 and 3.14. Error wording changes slightly between versions, so the message on your screen may not match the lesson word for word. That is normal. If your message differs, copy the code and the error into an AI assistant and ask it to explain the difference and give you updated code for your version.
- What is a program: A program is an ordered list of exact instructions. ~10 min
- Installing and running Python: Check your Python version, run a script, and use the interactive prompt. ~15 min
- Showing output and reading input: Use
printto show values andinputto read an answer. ~15 min - Variables and types: Store values in named variables and check their types. ~15 min
- Arithmetic: Use the arithmetic operators and the order in which Python applies them. ~15 min
- Reading error messages: Find the error type, the message, and the line that caused it. ~15 min