Home/Learning Hub/Python

Workshop 1 of 3

Python

Learn to think like a programmer. Write real Python from your first line to a finished game.

Level
Beginner. No coding experience needed.
Who it is for
Students from about 4th grade up, and any adult new to programming.
Length
5 sessions, about 5.3 hours in total
You need
  • A web browser
  • An online Python editor such as Replit, Trinket or Google Colab (free), or Python 3 installed on your computer
Before you start
A computer with internet access. A free account on an online Python editor, or Python installed.

What you will be able to do

  • Store and use information with variables
  • Make programs decide with if and else
  • Repeat work with loops
  • Organize data with lists and dictionaries
  • Build your own functions and a finished number guessing game

Final project: A number guessing game with a score and a play-again option.

The five sessions

  1. Session 1

    Hello, Python

    Write your first program, store information in variables, and ask the user a question.

    60 min · Project: About Me card
  2. Session 2

    Making Decisions

    Compare values and make your program choose what to do with if, elif and else.

    60 min · Project: Ticket price calculator
  3. Session 3

    Loops

    Make the computer repeat work for you with for loops, while loops and range().

    60 min · Project: Times table and total
  4. Session 4

    Lists and Dictionaries

    Keep many values together in a list, and look things up by name in a dictionary.

    60 min · Project: Snack shop
  5. Session 5

    Functions and the Guessing Game

    Package code into reusable functions, then combine everything you have learned into a finished game.

    75 min · Project: Number guessing game

Next workshop: Machine Learning