Skip to content
An introduction to programming with a fireworks display.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This project depends on pygame.

# using pip
python -m pip install -U pygame --user

# for windows, may need to “cd C:\Python27” or something similar first
python.exe -m pip install -U pygame --user

# using pip command
pip install pygame

# using apt
sudo apt-get install python-pygame

Lecture Notes

Intro, what is programming

First program, hello world, demo

expressions (arithmetic)

variables (substitution)


Function as a blackbox

functions, greeting (print name), math.fabs/sin, degToRad

Fireworks, demo

Blackbox, diagram


(if there is time)

loops, print numbers from 1 to 10, from 1 to a, factorial (with function)


  1. Black box

    Everyday examples: phone, car, ticket machines, math functions

    Example: fireworks program, give it a function that defines the shape and that defines the color

  2. Functions

    Example: just like math functions, show how to define some different shapes

  3. Control

    Example: computer makes choices (logic), show how to define color function

Lab Work

Go through one firework example together (

Let students create their own firework shapes and colors has a wide variety of shapes and colors

You can’t perform that action at this time.