Python from zero: your first programs

Never written code? Start here.

⏰ 11 weeks🎯 Standard🧩 Capstone🖥 Any device · our GPUs
Generated from this course

🎯 About this course

This course assumes you know nothing about programming or computers. You will learn by doing: every page has examples to run and exercises of many kinds, from ordering steps and spotting bugs to writing your own code in the browser. You will build a daily report for a tea stall, and learn what your computer is really made of and where to look when something goes wrong.

By the end you will be able to

  • Explain in plain words what a computer and a program are, and run a first Python program.
  • Use numbers and text in Python to calculate and format a bill.
  • Use names to store values and choose between actions with comparisons and if/elif/else.
  • Use lists, loops and dictionaries to process a collection of items.
  • Write small tested functions and combine them into a complete program.
  • Diagnose a failing program with a method, and handle bad input with try and except.
  • Use tuples, sets, sorting, comprehensions, modules, JSON, files and classes to build a small program that reads, processes and saves data.
  • Explain the role of each part of the computer and the tools that run Python, and find answers in the official documentation.
Curriculum

Topics covered

Meeting the computer 5 topics

  • Scene 0: your first morning at the tea stall
    Forty-five minutes of clicking, dragging and typing a line or two of Python: every kind of exercise in the course, and nothing to install.
  • What a computer really does
    What a computer is made of, what a program is, and your first line of Python: print.
  • Your first program: print, comments and error messages
    How a print line is built, how to leave notes with comments, and how to read an error message calmly.
  • Numbers: your tea stall calculator
    Using Python as a calculator: the arithmetic symbols, the order of work, whole parts and remainders, and rounding money.
  • Text: names, signs and messages
    Strings: joining and repeating, f-strings, the built-in tools, picking out characters, and special characters.

Remembering and deciding 4 topics

  • Variables: giving things names
    Variables as labelled jars: assigning, using, changing, and choosing good names.
  • Kinds of values: whole numbers, decimals, text and yes/no
    The four everyday types, why quote marks matter, and converting between types with int, float, str and bool.
  • Comparing: questions with yes/no answers
    Comparison symbols, the difference between = and ==, comparing text, and combining questions with and, or and not.
  • Making decisions: if, elif and else
    Running different instructions depending on a question: if, else, elif, indentation and the order of rules.

Lists, loops and lookups 4 topics

  • Lists: many things in one place
    Lists: making them, positions and slices, the everyday tools, and changing a list.
  • Loops: do it again for every item
    The for loop: repeating steps for every item, the total and count patterns, and range.
  • More loops: counting, patterns and while
    Counting up and down with range, the four loop patterns (total, count, collect, biggest), while loops and break.
  • Dictionaries: looking things up by name
    Dictionaries: key and value pairs, looking up, adding and changing, safe lookup, and looping over items.

Reusable pieces 4 topics

  • Functions: your own named recipes
    Writing and calling functions: def, parameters, arguments, return versus print, and private names.
  • Functions with decisions and loops
    Functions that decide and repeat: returning early, totals and counts in functions, functions calling functions, default values and testing edges.
  • When things go wrong: errors and debugging
    The three kinds of mistake, reading a traceback, a method for finding bugs, assert, and handling bad input with try and except.
  • Putting it together: the daily report
    A project: build the stall's daily report from small tested functions, using a list of dictionaries, counting into a dictionary, and a clear rule for unknown items.

Going further 5 topics

  • Tuples, sets and sorting
    Tuples as fixed bundles, sets for no repeats and group questions, sorting by any rule, and the helpers enumerate and zip.
  • Comprehensions and handy built-ins
    Loops in one line (list and dictionary comprehensions), and the helpers sum, min, max, any, all and join that replace loops.
  • Modules, dates, chance and JSON
    Importing modules: math, datetime, random and collections, and JSON, the text format that a web page and a Python backend use to talk.
  • Files, text data and input
    Writing and reading files, taking text apart with splitlines, strip and split, reading messy data safely, and asking the user with input.
  • Classes: your own kinds of thing
    Classes, objects, attributes and methods, init and self, objects that change, printing with str, and when to use a class instead of a dictionary.

Infrastructure behind your Python 4 topics

  • The infrastructure map: what your computer is made of
    Name the parts of a computer, what each does for your Python programs, and trace the path of one program.
  • Where Python runs: the interpreter and your tools
    The interpreter, the editor, the terminal, the browser worker and pip: what each does, what version means and how to read the official documentation.
  • Files, folders and the terminal
    Files, folders, paths, extensions and three safe terminal commands: how to find your way and why a file is not found.
  • Documentation and looking after your work
    Reading official documentation, comments, backups, version history and a handover note: how to look after what you have written.

Interview ready 2 topics

  • Interview ready: the basics
    The questions people really ask about the basics, with model answers, three classic first problems and a mock round.
  • Interview ready: functions, collections and classes
    The questions people really ask about functions, containers, errors, files and classes, with model answers, timed problems and a mock round.
Course at a glance

See how this course is built

Where the time goes

Longer spokes mean more hours on that module.

Course roadmap click a step

Try a lesson0 / 3

Sample questions from this course. Your progress is kept only in your browser.

Week by week

Drag the slider, or press play, to walk through the course and see what you will have built by each week.

Week 1 of 11
Wk 1

Meet the computer

The warm-up studio and scenes 1 and 2: what a computer does, print, comments and errors.

Wk 2

Numbers and text

Scenes 3 and 4: the calculator, rounding money and text tools.

Wk 3

Remembering and deciding

Scenes 5 and 6: variables and kinds of values.

Wk 4

Questions and rules

Scenes 7 and 8: comparisons and if/elif/else.

Wk 5

Many things at once

Scenes 9 to 12: lists, loops and dictionaries.

Wk 6

Reusable pieces

Scenes 13 and 14: functions.

Wk 7

Errors and the daily report

Scenes 15 and 16: debugging and the project.

Wk 8

Going further

Scenes 17 to 21: tuples, sets, comprehensions, modules and JSON, files and classes.

Wk 9

Under the hood

Scenes 22 to 25: the infrastructure sessions.

Wk 10

The capstone review

Present the daily report and the infrastructure card sheet.

Wk 11

Interview ready

Scenes 26 and 27: model answers, timed problems and mock rounds.

What you'll build

The daily report program

A tested Python program that turns a list of sales into a short report for the stall.

Infrastructure card sheet

Seven cards for the parts of your own computer, a sizing estimate and one failure drill.

Why take this course

  • Learn Python with nothing to install
  • Write code on every page
  • Understand the machine as well as the language

You will build

  • A bill calculator
  • A price board with lookups
  • A daily sales report

What you can do afterwards

  • Write and test small Python programs
  • Find and fix mistakes with a method
  • Say what each part of a computer does and where to read the documentation
How to take it

💳 Delivery & fees

One course, four ways to attend. Contact us for pricing: tell us the format you want and we will send you a quote. Bulk and institutional volume pricing is available.

Most popular

Live online

Contact us for pricing

  • Everything in self-paced
  • Scheduled live classes
  • 1:8 mentor code review
  • Cohort + capstone review

Hybrid — weekend

Contact us for pricing

  • Recorded weekday lessons
  • Live weekend sessions
  • Full mentor review
  • Cohort + capstone

Live in-person

Contact us for pricing

  • Everything in live online
  • Classroom instruction
  • On-site mentor time
  • In-person study group

Bulk and institutional pricing. Volume discounts are available for institutions, campuses, companies and groups enrolling several learners. Ask for a group quote →

Your fee includes our GPU lab infrastructure — no cloud credits to buy. See how we compare, with sources →

Ready when you are

Apply for this course

Tell us the format you prefer and we'll confirm the next cohort date and your fee on a short call.

Apply for this course