AAP-2.C Evaluate expressions that use arithmetic operators
AAP-2.E For relationships between two variables, expressions, or values:
a. Write expressions using relational operators.
b. Evaluate expressions that use relational operators.
AAP-2.G Express an algorithm that uses selection without using a programming language.
AAP-2.H For selection:
a. Write conditional statements.
b. Determine the result of conditional statements.
The objective for this lesson is to add a conditional fill (i.e. a beat that only happens every 3rd beat count or every fourth beat count) to the computational makeBeat loop created in the previous lesson. Activity 1 will introduce selection/conditionals and arithmetic relational operators. Activity 2 will introduce modulus arithmetic and apply it with selection statements add a conditional fill beat to the previously made beat loop.
Activity 7.6.1 (55 minutes)
Facilitate students’ discussion on the Burger King commercial on “Have it your way” relating to conditional algorithms (PowerPoint slide 2).
Facilitate PowerPoint to explore reading input from the console and data type conversion (Powerpoint slides 3-6, EarSketch Chapter 17.1 (Console Input and Conditionals)).
Have students walk through EarSketch Chapter 17.1 code exercise “Musical Console Input” to prompt users for tempo input (PowerPoint slide 6).
Present PowerPoint and video explaining arithmetic operators, Boolean logic, Boolean operators, and conditional statements (PowerPoint slides 7-10, EarSketch Chapter 17.2 (Booleans) and 17.3 (Conditional Statements)).
Complete Choose your Change MiniTask (PowerPoint slide 11).