1 of 9

LESSON 4

SPEEDING THROUGH THE SQUARE

2 of 9

PTERODACTYL

    • Keep lips over your teeth

    • Say “pterodactyl” around the circle

OR

    • Change it up with your best pterodactyl call

    • Rule: If you smile or show teeth → You’re out!

NO TEETH

3 of 9

    • You’ll test Hopper’s flight distances at different power settings and times
    • Measure how far Hopper flies after each trial.

speed =

distance

SPEEDY HOPPER

How far does Hopper fly at different percentages of power?

time

    • Use an AI tool to check your calculations and graph your data.
    • Compare your data to other groups.

4 of 9

SPEEDY HOPPER CHALLENGE

    • Based on your calculations, what percentage of power and amount of time is necessary to have Hopper fly 4 feet?

4FT

% power

seconds

5 of 9

PERFECT SQUARE

Code Hopper to fly a perfect square.

    • Create one code for Hopper to fly a perfect square.

    • Decide as a group if Hopper must land or hover over each landing pad.

Debugging

    • Adjust distance or angles if needed

    • Add a hover before turns to fight momentum/curves

Remember: Debugging = problem-solving!

6 of 9

PERFECT SQUARE CHALLENGE

    • Code Hopper to fly 5 perfect squares in a row.

    • Work with your group to adjust your code.

    • Compare your code with others.

X5

7 of 9

INTRODUCING LOOPS

    • A loop is a command that repeats steps

    • Saves time & makes code efficient

    • Instead of writing 20 lines, you can write just a few

Sample Loop Commands

8 of 9

LOOPING PERFECT

S

    • Rewrite your square code using loops

    • Make Hopper fly 5 squares with a short, efficient program

CHALLENGE YOURSELF

After you successfully test your code, add a second loop to make your program as short and efficient as possible.

X5

9 of 9

    • What adjustments did you need to make to your code to get Hopper to complete the square accurately?

    • If you wanted Hopper to fly a rectangle instead, what changes would be necessary?

    • Did your code look different from another team’s code? What was similar or different?

    • Can you think of real-world examples where loops would be especially useful in coding?

DISCUSSION