Close
Close full mode
logoMakeCode AP CSP

Projectiles Part 1

Summary

Materials

Instructional Activities and Classroom Assessments

  1. Loops Review (5 minutes)
  2. Introduction to Projectiles (10 minutes)
  3. Projectiles Activities (35 minutes)
  4. Reflection/Homework

Learning Objectives

  • AAP-2.K For iteration:
    • a. Write iteration statements. 2.B
    • b. Determine the result or side effect of iteration statements. 4.B

Essential Knowledge

  • AAP-2.K.1 Iteration statements change the sequential flow of control by repeating a set of statements zero or more times, ntil a stopping condition is met.
  • AAP-2.K.2 The exam reference sheet provides:
Text:
REPEAT n TIMES
{
<block of statements>
}
Block:
REPEAT n TIMES
block of statements in which the block of statements is executed n times.
Text:
REPEAT UNTIL(condition)
{
<block of statements>
}
Block:
REPEAT UNTIL
block of statements condition in which the code in block of statements is repeated until the Boolean expression condition evaluates to true.

Details

1. Loops review (5 minutes)

  • Discuss the answers to the following questions:
    • What are loops?
    • What are the different types of loops in MakeCode and how is each one used?
    • How can using loops making your code better?

2. Introduction to projectiles (10 minutes)

  • Review sprites.
  • Remind students of our use of Projectiles in the Galga game.
  • Define and discuss the qualities of projectiles.
  • Direct students to the Projectiles Activities page and guide them through Section A of the page (i.e., the Flying Bird activity).
  • Discuss what happens when they change the numbers for vx and vy.
  • Discuss what happens when they change vx or vy to a negative number.
  • Demonstrate the concept that projectiles are automatically destroyed when they leave the visible screen:
    • Students will add code that changes the score when the projectile is destroyed.
    • Students will observe when the score changes.

3. Projectiles activities (35 minutes)

4. Reflection/Homework

If you run out of time, you may also assign this as individual homework Students should complete their reflection.

  • How did using a loop in Task 2b help reduce the amount of blocks that were used?
  • What are the benefits of using projectiles rather than normal sprites?
πŸ“˜ Unit 3 - AAP Part 1 β€” Previous
Day 16
Next β€” πŸ“˜ Unit 3 - AAP Part 1
Projectiles Activities