Lesson #7-1: Lists
Watch Video 7-1: Lists
Access www.codeskulptor.org
Write and Save a Lists.py file (remember to save it with time stamp)
http://www.codeskulptor.org/#user5-2On0zTJDu3jITC8.py
Write an empty list, a list of numbers, and a list of strings.
Does the order of a list matter?
Why does position = [4, 9] tell you where something is?
How can you locate the first item in a list? The third item? The last item?
How can you determine the length of a list?
How can you change(mutate) the second item in a list to a new value?
Lesson #7-2: Keyboard Input
Watch Video 7-2: Keyboard Input
Access www.codeskulptor.org
Write and Save a Keyboard_Input1.py file (remember to save it with time stamp)
http://www.codeskulptor.org/#examples-keyboard-0.py
Why is there a difference between keydown and keyup?
What is chr short for? What does chr do in python?
Write and Save a Keyboard_Input2.py file (remember to save it with time stamp)
http://www.codeskulptor.org/#examples-keyboard-1.py
Why does the ball only move each time you push the key?
How can you make the ball move more with each push of a key?
What is the difference between position[0] and position[1]?
Lesson #7-3: Motion
Watch Video 7-3: Motion
Access www.codeskulptor.org
Write and Save a Motion1.py file (remember to save it with time stamp)
http://www.codeskulptor.org/#examples-motion_explicit.py
With each tick from the timer, what happens to the ball?
How do you make the ball move down and right with each timer tick?
Write and Save a Motion2.py file (remember to save it with time stamp)
http://www.codeskulptor.org/#examples-motion_implicit.py
With this type of motion control, why don't you need a timer?
How many times a second does the draw handler redraw the canvas?
What does p[0] = p[0] + v[0] do?
Lesson #7-4: Collisions and Reflections
Watch Video 7-4: Collisions and Reflections
Access www.codeskulptor.org
Write and Save a Keyboard_Input.py file (remember to save it with time stamp)
http://www.codeskulptor.org/#examples-collisions_and_reflections.py
*** Warning! Lots of math! Lots of geometry!
How can you get a ball to bounce off a wall?