Python Programming From Zero

Go from installing Python to writing your own working scripts with variables, loops, functions, and files.

This course is for members

$9 unlocks every course in the library, this one included, plus a credit to build a topic of your own and at least 10 new courses every month.

What you will learn about Python Programming from Zero

The 7-day sprint
  1. Running Your First Program. Python is an interpreter that reads your instructions one line at a time, from top to bottom, and does exactly what each line says.
  2. Variables, Types, and Input. A variable is a name you attach to a value so you can reuse it and change it later, and every value has a type that decides what you can do with it.
  3. Making Decisions With if. An if statement lets your program test a condition and run one block of code instead of another, and indentation is what tells Python which lines belong to which branch.
  4. Repeating Work With Loops. A loop runs the same block of code many times, either once for each item in a collection with for, or for as long as a condition stays true with while.
  5. Lists and Dictionaries. A list stores many values in order and is reached by position, while a dictionary stores values under keys you choose and is reached by name.
  6. Writing Your Own Functions. A function packages a block of code under a name so you can run it many times with different inputs and get a value back.
  7. Modules, Files, and Errors. Real programs borrow code from modules, read and write files, and expect things to go wrong, so you import what exists and catch the failures you can predict.
The 80/20: the 7 concepts that matter most
  • Names, objects, and assignment
  • Picking the right container
  • Control flow and indentation
  • Functions
  • Iterating the Python way
  • Reading errors and handling exceptions
  • The standard library, pip, and virtual environments
The core idea, explained like you are 5

A variable is a name attached to a value, and running a program means carrying out instructions in order, each one reading or re-attaching those names.

Then the quiz and the ladder

10 questions that correct you when you are wrong, and beginner, intermediate, advanced levels, each with a practical exercise.

Created . Rebuilt . 3 mistakes reported by learners, 3 addressed in a rebuild.

Written from these sources