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
Intro, what is programming
First program, hello world, demo
expressions (arithmetic)
variables (substitution)
import
Function as a blackbox
functions, greeting (print name), math.fabs/sin, degToRad
Fireworks, demo
Blackbox, diagram
Polar
(if there is time)
loops, print numbers from 1 to 10, from 1 to a, factorial (with function)
lists
-
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
-
Functions
Example: just like math functions, show how to define some different shapes
-
Control
Example: computer makes choices (logic), show how to define color function
Go through one firework example together (simple.py)
Let students create their own firework shapes and colors
main_example.py has a wide variety of shapes and colors