Free Python Games Curriculum¶
What follows are notes for a week-long curriculum developed for Maker Camp at The River Church Community. Maker Camp was a summer day camp for Middle School students in the California Bay Area.
Each game has exercises at the top.
Visualize code with http://pythontutor.com
Extras: $ python3 -m turtledemo
Day 1¶
What is a computer? Calculator + Clock.
Discuss Alan Turing and Turing Machines.
Discuss John Von Neumann and Von Neumann Machines.
What is a program? Computer Recipe.
Introduce Terminal, black background, give the computer commands.
Introduce Python Shell, white background, write Python statements.
Activity: connect and decorate computers.
Problem solving: divide and conquer.
Statements: assignment, if/elif/else, while, import
Data types: int, str
Functions: print, help, int
Modules: random
Games¶
Bible Story¶
Genesis 1 - God the Creator (Creation)
What did God do at the beginning?
What did God see in creation?
What is special about people?
Why do we create things?
Day 2¶
Activity: Blind partner obstacle course.
Problem solving: brute-force.
Famous Christian programmer: Donald Knuth
Statements: try/except, for, def
Data types: float, bool
Functions: type, dir, str, ord, chr
Modules: turtle
Games¶
Crypto.py - Encrypt, decrypt and decode messages.
ord function and chr function
modulo operator
Write decode function
Encrypt numbers
Paint.py - Draw shapes.
Draw line
Draw square
for-statement, range function.
Draw five-pointed star: forward(50); right(144) (x5)
Draw six-pointed star: forward(50); left(60); forward(50); right(120) (x6)
help(…)
undo(…)
def-statement, refactor code to star function
color(‘green’); color(‘blue’, ‘yellow’)
begin_fill(); end_fill()
width function
Write polygon(sides, length) function
Flappy.py - Flappy Bird inspired game.
Bible Story¶
Genesis 6:5-22 - God the Engineer (Noah)
Why did God regret making people?
How was Noah different?
What was God’s plan?
How are we washed today?
Day 3¶
Activity: Simon Says
Famous Christian programmer: Fred Brooks
Functions: onscreenclick, onkey, ontimer
Games¶
Bagels.py - Digit guessing puzzle.
Animation
Draw arc: circle(100, 90)
flower(…)
Draw flower and rotate
ontimer(…)
hideturtle(); tracer(False); polygon(4, 200); update()
Tic Tac Toe.py - Tic-tac-toe.
line(…)
grid(…)
drawx(…)
drawo(…)
floor(…)
onscreenclick(goto)
Simon Says.py - Simon Says
Cannon.py - Hitting targets with projectiles.
Bible Story¶
Mark 1:1-18 - God the Programmer (“fishers of people”)
What did Isaiah say would happen?
What did John the Baptist say would happen?
What did God say about Jesus? When?
How did Jesus give his disciples new jobs?
Day 4¶
Activity: Collage of concepts.
Famous Christian programmer: Larry Wall
Data types: list, dict, vector
Games¶
Bible Story¶
John 9:1-33 - God the Debugger (Blind Man and Jesus)
What does Jesus tell the disciples?
What does the man tell the Pharisees?
What does the man believe about Jesus?
What do you believe about Jesus?
Day 5¶
Activity: Make or modify your own game.
Famous Christian programmer: Jon Skeet
Answer: What next?
Games¶
Connect Four.py - Connect Four
Memory.py - Puzzle game of number pairs.
Pacman.py - Classic arcade game.
Bible Story¶
Revelation 21 - God the Restorer (New Heaven and New Earth)
What does God make? When?
Who is the Lamb and the Bride?
What is special about the city?
How can we live in the Holy City?