Intro to programming with Python
Your first programming course: variables, decisions, loops, lists, functions and small projects. Write and run real code in your browser.
1. Getting started
What a program is, how to make the computer show things, and how to leave notes in your code.
2. Variables
Give values a name so your program can remember and change them.
3. Numbers and arithmetic
Use Python as a calculator: operations, whole-number division, remainders, powers and rounding.
4. Working with text
Strings: joining, filling in values with f-strings, picking out characters, and handy text tools.
5. Getting input
Ask the person using your program for information, and turn their answers into numbers.
6. Making decisions
True and False, comparisons, and if / elif / else so your program can choose what to do.
7. Loops
Repeat work with while and for, and learn the classic loop patterns.
8. Lists and tuples
Keep many values together in order, change them, and loop over them.
9. Dictionaries
Look things up by name instead of by position.
10. Functions
Package steps into named, reusable tools with def, parameters and return.
11. Errors and debugging
Read error messages calmly, fix the common ones, and handle problems with try / except.
12. Modules and final projects
Borrow ready-made tools with import, add randomness, and build programs that combine everything.