## Lesson Plans

Computing Needs All Voices

Students learn about a diverse group of programmers through a short film and a gallery walk of our Pioneers in Computing and Mathematics poster series, then consider the problem solving advantages that diverse teams foster.

Simple Data Types

Students begin to program, explorings how Numbers, Strings, Booleans and operations on those data types work in this programming language.

Contracts

Students learn how to apply Functions in the programming environment and interpret the information contained in Contracts: Name, Domain and Range. Image-producing functions provide an engaging context for this exploration.

Function Composition

Students learn to combine image transformation functions as well as to describe the order of operations involved in algebraic function compositions such as f(g(h(x))) using Circles of Evaluation.

Defining Values

Students learn to improve readability, performance and maintanability of code by defining values that repeat in code, just as we would define variables in math.

Making Flags

Students recreate images of flags of varying complexity by transforming and composing image functions and applying their knowledge of ratios and coordinates to scale and position the shapes precisely.

Solving Word Problems with the Design Recipe

Students are introduced to the Design Recipe as a scaffold for breaking down word problems into smaller steps. They apply the Design Recipe to fixing a file that launches a rocket!

Introduction to Data Structures

Students encounter Data Structures in the context of using coordinates to model 2D animation. They explore constructors and fields, creating a "digital bakery" using structures to model cakes.

Structures, Reactors, and Animations

Students implement animation using a modified Model-View-Controller paradigm called Reactors. Using a data structure to represent the position of an object, they write draw-state functions to draw single frame from instances of that structure and next-state-tick functions to generate new instances from previous ones. They learn how to use Reactors to combine their structure and functions into a complete animation.

Students are introduced to if-then-else expressions, writing conditionals that deal with simple types (Numbers, Strings, Booleans, etc) and data structures of their own to implement a more complex animation.

Key Events

Students are introduced to key events, and use if-then-else expressions to write a key-event handler that moves an image left and right as part of an interactive animation.

Refactoring

This lesson focuses on code quality. Starting from a working program, students refactor the code to be more readable, writing helper functions thinking structurally about a complex program.

This lesson removes earlier scaffolding from working with Reactors, having students brainstorm an original animation of their own and implement it from start-to-finish. This requires them to plan out what kind of data structure they will need, and how it will be drawn and updated.

Students create a game of their own design using what they have learned so far.

Students use the distance formula and their data structures to determine when two or more characters in their games have collided. They extend their update handlers to generate a new structure that represents the game after a collision has occurred.

Scoring

Students extend the data structure that represents their game to include a score, then modify their helper functions and event handlers to update and display that score.

Students parameterize other parts of their game, so that the experience changes as the score increases. This track delves deeper into conditionals and abstraction, offering students a chance to customize their games further while applying those concepts.

Making Pong

Students use the Animation Design Worksheet to decompose a 2-player game of Pong, and implement it as a Reactor-based program.

Going Deeper: Nested Structures

Students refactor code from a simple animation to include structures within structures, and see how to use nested structures in their own games and animations to manage complexity.

Feature: Timers

Students parameterize other parts of their game, so that the experience changes as a new data field, a timer, changes. This track delves deeper into conditionals and abstraction, offering students two possible uses for a timer feature, and a chance to customize their games further while applying those concepts.

## Student Workbooks

Sometimes, the best place for students to get real thinking done is away from the keyboard! Our lesson plans are tightly integrated with a detailed Student Workbook, allowing for paper-and-pencil practice and activities that don’t require a computer.