Everwhy Open Everwhy
Computing

Could you tell a computer exactly what to do, in a language it understands?

Python 101 · about 12 minutes a level

Learn to read and write Python, a programming language designed to be easy to read, from the very first line. You'll print messages, store values in variables, make decisions, repeat work with loops, organise data in lists and dictionaries, and package code into functions, then put it all together in a small project.

Open in Everwhy Continue on the web

Go deeper, level by level

  1. First programs: Your first program: print and strings, Variables and arithmetic: giving values names, Making decisions with if, elif and else
  2. Values and types: Types: int, float, str and bool, Asking the user: input(), Working with text: indexes, slices and string methods
  3. Decisions in depth: Combining conditions: and, or, not, Comparing text and checking with in, Nested decisions and truthiness
  4. Loops: Repeating with while, Counting with for and range(), Running totals, counters and break
  5. Lists: Lists: many values under one name, Looping over lists, Sorting, slicing and searching lists
  6. Functions: Defining your own functions, Parameters and return values, Scope: where variables live
  7. Dictionaries: Dictionaries: looking things up by key, Counting and grouping with dictionaries
  8. A small project: Reading error messages calmly, Planning a program: a quiz game, Building the quiz game step by step, Testing and improving your project

Every lesson shows its sources and how sure we are, and is checked by Everwhy.