Lab 5: Follow the Leader

Mary still needs to review/revise this page. --MF, 5/26/20

Students create scripts in which a sprite follows the mouse around the stage and its position is sensed and followed by a second sprite. They also continue to build experience with control structures for which conditions can be set (e.g., loops and conditionals) without yet formalizing. Resist the urge to "teach" these concepts at the outset; instead, allow students to learn how these work in context, applying them to their programs. Students will get lots of experience with loops and conditionals and will codify this learning later.

This lab also solidifies students' understanding of multiprocessing: the fact that two sprites can each run its own script in parallel.

Reading the mouse position will be used repeatedly in later units. It's not something to make a fuss about, but if you skip this lab's first page you may spend the time later teaching about mouse coordinates.

Pacing

The 2 lab pages could be split across 1–2 days (35–70 minutes). Expected times to complete follow:

Lab Pages

Solutions

Correlation with 2020 AP CS Principles Framework 

Essential Knowledge: