CODE.ORG UNIT 3 - ANIMATION AND GAMES - Students are responsible for all assignments in each lesson plus the activity guides listed below.
Lesson 9 -Sprite Movement
By combining the Draw Loop and the Counter Pattern, students write programs that move sprites across the screen, as well as animate other sprite properties.
Lesson 10 - Booleans Unplugged
In this lesson, students are introduced to boolean values and logic, as well as conditional statements. The class starts by playing a simple game of Stand Up, Sit Down in which the boolean (true/false) statements describe personal properties (hair or eye color, clothing type, age, etc). This gets students thinking about how they can frame a property with multiple potential values (such as age) with a binary question.From there students are provided a group of objects with similar, yet varying, physical properties. With a partner they group those objects based on increasingly complex boolean statements, including compound booleans with AND and OR.Finally we reveal Conditionals as a tool to make decisions or impact the flow of a program using boolean statements as input.
Lesson 11 - Conditionals
Students start by using booleans to compare the current value of a sprite property with a target value, using that comparison to determine when a sprite has reached a point on the screen, grown to a given size, or otherwise reached a value using the counter pattern. After using booleans directly to investigate the values or sprite properties, students add conditional if statements to write code that responds to those boolean comparisons
Lesson 12 - Keyboard Input
Following the introduction to booleans and if statements in the previous lesson, students are introduced to a new block called keyDown() which returns a boolean and can be used in conditionals statements to move sprites around the screen. By the end of this lesson students will have written programs that take keyboard input from the user to control sprites on the screen.
Lesson 13 - Other Forms of Input
In this lesson students continue to explore ways to use conditional statements to take user input. In addition to the simple keyDown()command learned yesterday, students will learn about several other keyboard input commands as well as ways to take mouse input.
Lesson 14 - Project Interactive Card
In this cumulative project for Chapter 1, students plan for and develop an interactive greeting card using all of the programming techniques they've learned to this point..
Start Chapter 2 - Building Games (Lessons 15 - 22)