Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Setup

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)

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

  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 (simple.py)

Let students create their own firework shapes and colors

main_example.py has a wide variety of shapes and colors

About

An introduction to programming with a fireworks display.

Resources

Packages

No packages published

Languages