Teaching at home? The family edition is the same lesson, written for a parent and one to three kids.

Slides for the board (PowerPoint, 13 slides) Lesson PDF Google Slides: upload the PowerPoint file to Google Drive and open it with Google Slides.

Drone Simulator: Program a Drone Through the Rings

Grades 4-8 · 45 minutes · Computer science, Math

Students run a block program that flies a drone through six rings and lands. They find out that each fly to block is a place in the sky, three numbers for left and right, forward and height, and that the drone goes exactly where those numbers say. By the end, they can change one number, say beforehand which ring will stay orange, and fix a classmate's broken program by reading it.

At a glance

Essential question

How does a program tell a drone where to fly?

Objectives

Students will be able to:

  • explain what the three numbers in a fly to block mean: left and right, forward, and height
  • predict which ring a changed number will make the drone miss, then test the prediction
  • find the block that makes a drone miss a ring by reading the program, and fix it
  • change a program on purpose so the drone skips a ring, without deleting any blocks

Vocabulary

program, block, sequence, coordinates, altitude, predict, bug

Standards

1B-AP-10, 1B-AP-15, 2-AP-17, 5.G.A.1

Time and materials

45 minutes, grades 4-8.

  • One computer or Chromebook per student or pair
  • A projector
  • The worksheet and exit ticket, one copy each per student
  • The rubric, one copy per student if you grade the project

Prep

Make copies of the worksheet and exit ticket. Before class, open mytekdev.com/try/dronesimulator?lesson=program-a-drone-through-the-rings&ref=tpt-drone-1 once on a student computer, press Run, and watch the drone fly the six rings, to check that your school's filter allows it and that the 3D view runs on your computers. No account is needed.

Assessment

  • Formative: the questions under What to look for, asked while students work, and the exit ticket (answer key included).
  • Summative: the worksheet's prediction table and the student's two challenges, scored with the rubric out of 12.

Technology and privacy

Runs in any browser, Chromebooks included, with nothing to install. The 3D view is drawn by the computer's graphics, so older computers run it more slowly but get the same result. Students need no account and no email: the link works signed out, and nothing they make is stored on our server unless they choose to save it to an account. If your school blocks new sites, ask IT to allow mytekdev.com.

Before you teach: do it once yourself

Fly the course and make the lesson's changes yourself once before class, about ten minutes.

  1. Open the lesson. Go to mytekdev.com/try/dronesimulator?lesson=program-a-drone-through-the-rings&ref=tpt-drone-1. The app opens on the Simulator with six orange rings. Press Run, the play button at the top left. Each ring turns green as the drone flies through it, and the counter at the top of the 3D view ends at Course Complete! with 6 / 6.
  2. Read the program. Open Blocks: arm drone, takeoff to 22, six fly to blocks, land. The first fly to block is x 0, y 70, alt 22.
  3. Miss ring 1. Change the first block's x from 0 to 30. Go back to Simulator, press reset, the circle arrow next to Run, then Run. Ring 1 stays orange, the other five turn green, and the counter stops at Gates: 5 / 6. Set x back to 0.
  4. Miss ring 3. Change the third block's x from 18 to -18, reset and Run. Ring 3 stays orange. Set it back to 18.
  5. Skip ring 4. Change the fourth block's alt from 30 to 60, reset and Run. The drone flies over ring 4. Set it back to 30.
The ring program in Blocks: when started, arm drone, takeoff to 22, six fly to blocks with their x, y and alt numbers, then land

The starter program. Each fly to block aims 10 past one ring: the rings are at 60, 120, 180, 240, 300 and 360 forward.

Run and reset are only on the Simulator tab, so after every change in Blocks, students have to switch back. A drone that was not reset starts where it last landed, at the far end of the course, and the result makes no sense. Typing in the Python tab brings up a warning that Python changes cannot be converted back into blocks; after that, Run uses the Python and ignores changes to the blocks.

Background in plain words

A program is a sequence: the drone runs one block, finishes it, then runs the next, top to bottom. Each fly to block names a place in the sky with three numbers, the way a street address names a house: x is left and right, y is forward, and alt is the height. The block does not say how to get there; the drone works that out and flies straight to the spot.

Because each block names a place rather than a move, the blocks do not depend on each other. Change one block and the drone goes somewhere new for that one leg, then the next block sends it back to the next ring. That is why one wrong number leaves exactly one ring orange, and why a student can find a bug by reading: match each block to its ring and look for the number that does not fit.

Students askA good answer
Why is y forward and not up?Think of x and y as a map lying flat on the ground. Height gets its own number, alt.
Why does the block say 70 when the ring is at 60?It aims just past the ring, so the drone flies through it and out the other side instead of stopping in it.
Why does only one ring stay orange?Each fly to block aims at one ring. The next block still aims at the next ring, so the drone gets back on course.
Why are some x numbers negative?The middle of the course is x 0. Positive numbers are on one side of that line and negative numbers on the other, so 18 and -18 are the same distance from the middle on opposite sides.

Lesson sequence

MinutesStageWhat you doWhat students do
0 to 7Warm-up
Hook
Show the title, essential question and Today I can slides (about 1 minute). Then have students open the link or scan the QR code on the worksheet. The app opens on the Simulator with the course of six orange rings. A short guide runs along the bottom: tell students to do its first step only, which is to press Run (the play button) and watch, then wait. Each ring turns green as the drone flies through it, and the drone lands at the end. Ask: "How does the drone know where each ring is?"Run the program, watch all six rings turn green, and answer the question.
7 to 15Direct instruction (I do)
Model it
Show the vocabulary slide. Then, on the projector, open Blocks. Read the program from top to bottom: arm, takeoff to 22, six fly to blocks, land. Say: this is a sequence, steps that run in order. Point to the first fly to block: x 0, y 70, alt 22. Say: these are three coordinates. x is left and right, y is forward, and alt is the altitude, the height. The first ring is 60 forward and 22 high, and the block aims at 70 so the drone flies through the ring and out the other side. Show the Before every Run slide: Run starts from wherever the drone is, so press reset, the circle arrow next to Run, first. Then change the first block's x from 0 to 30, ask the class to predict which ring will stay orange, press reset and Run. Ring 1 stays orange and the other five turn green.

It's working when: With ring 1 missed, the counter at the top of the 3D view stops at Gates: 5 / 6 instead of Course Complete!.

Watch, predict out loud, and fill in worksheet step 2.
15 to 23Guided practice (We do)
Predict, then test
Everyone sets the first block's x back to 0. Then together: find the third fly to block (x 18, y 190, alt 22) and change its x to -18. Before anyone presses Run, students write in the table which ring they think will stay orange. Then reset and Run. Ring 3 stays orange, because the drone now flies to the other side of it; the rings before and after still turn green. Set it back to 18. Before moving on, check that every table has a prediction and a result for this row.

Watch for: Students change the number and look for Run in Blocks. Run and reset are on the Simulator tab only. If the drone flies back down the course, it was not reset first.

Write a prediction, press reset and Run, and record what happened.
23 to 37Independent practice (You do)
Two challenges
Walk the room and ask the questions under What to look for. Challenge 1: make the drone skip ring 4 without deleting any blocks (raising the fourth fly to block's alt from 30 to 60 flies it over the ring; other changes work too). Challenge 2, in pairs: one student changes one number in one fly to block while the other looks away, and writes it down. This is a bug on purpose. The partner reads the blocks, predicts which ring will stay orange, then presses reset and Run, fixes the number and runs it again. Swap roles. Repeat the rule: every prediction is written before Run.

Watch for: A partner who hides the change by typing in the Python tab gets a warning dialog, and from then on Run ignores the blocks, so fixing the block changes nothing. Keep the secret change in Blocks.

Make the drone skip ring 4, then play the secret change game with a partner, writing each prediction first.
37 to 45Closure
Read the program, and exit ticket
Show the last slide and ask: "Ring 2 stays orange. Which block would you check first, and why?" (The second fly to block, because each block aims at one ring.) Ask the essential question again, then hand out the exit ticket.Answer out loud, then answer the exit ticket on their own.

What to look for

Ask these while students work. A student who has understood the lesson can answer them without help:

The last one is the real test. A student who can read a program and predict what it will do, before running it, understands that the drone does exactly what the blocks say.

Cross-curricular extensions

Vocabulary

programA list of steps for a computer to follow, in order.
blockOne step of a program. Blocks snap together, and the program runs them from top to bottom.
sequenceThe order the steps run in. Change the order, and the drone does something different.
coordinatesNumbers that say where something is. Here there are three: left and right, forward, and height.
altitudeHow high the drone is. The fly to block calls it alt.
predictSay what you think will happen before you test it.
bugA mistake in a program that makes it do something you did not want.

Differentiation

English learners

  • Post the vocabulary with a picture for each word: a block, the fly to block's three numbers, a ring.
  • Model each step on the projector before students try it, and point at the block as you name it.
  • Let students record predictions as ring numbers only, without sentences.

Students with IEPs or 504 plans

  • Where the IEP allows a modified assignment, do challenge 1 only; challenge 2 becomes an extension.
  • Pair students: one changes the number, the other presses reset and Run and reports the ring.
  • Raise the browser zoom so the numbers in the blocks are easier to read.
  • Read the exit ticket aloud, or let students answer by pointing at the block on their screen.

Students who need more support

  • Give a sentence starter for the table: "I think ring ... will stay orange because ..."
  • Write the ring table on the board: ring 1 is 60 forward, ring 2 is 120, ring 3 is 180, and so on, 60 apart.
  • Check in at minute 28: does the student press reset before every Run?

Students ready for more

  • Open the Python tab and find the line that is the block you changed. Change a number there and Run it.
  • Open Missions and press Start on Ring Runner. Fly all six rings in under 75 seconds for gold: try set speed in the Movement blocks.
  • Add a seventh fly to block that flies back over the course and lands at the start.

Adapting for other grades

Younger students: For grades 2 and 3, do the guided test as a class on the projector, do challenge 1 together, and score only the first two rubric rows (out of 8; 6 or more meets the objectives).

Older students: For grades 9 to 12, have students work in the Python tab, write the secret change as a line of Python, and add a short note: why each fly to aims 10 past its ring, and what would happen if it aimed at the ring's center.

Drone Simulator: Program a Drone Through the Rings

Student worksheet

Name: ______________________________ Date: ______________

Open the app: scan the QR code, or go to mytekdev.com/try/dronesimulator?lesson=program-a-drone-through-the-rings

Essential question: How does a program tell a drone where to fly?

  1. Run it. Press Run, the play button. Watch the six rings turn green.
  2. Read a block. Open Blocks. The first fly to block says x ____ y ____ alt ____. x is left and right, y is forward, alt is height.
  3. Reset first. Before every Run, press reset, the circle arrow, so the drone starts over.
  4. Predict, then test. For each change, write your prediction first. Then reset, Run, and write what happened. Change it back after.
ChangeI predict this ring stays orangeWhat happened
3rd fly to: x 18 to -18
My change to skip ring 4:
Partner's secret change

1. How did you make the drone skip ring 4 without deleting a block?

2. Which prediction surprised you most, or was wrong? Why?

Drone Simulator: Program a Drone Through the Rings

Exit ticket

Name: ______________________________

1. In the block fly to x 0 y 70 alt 22, what does 22 tell the drone? (A) how far forward to go, (B) how high to fly, (C) how fast to fly.

2. You change the x of the fifth fly to block and press reset and Run. What is most likely to happen? (A) the drone misses ring 5 and passes the others, (B) the drone misses every ring, (C) nothing changes.

3. Ring 2 stays orange in a classmate's program. Which block would you check first, and what would you look for?

Answer key: exit ticket

Measured in the app: changing one number in one fly to block makes the drone miss that block's ring only, and it still passes the others and lands. The first block's x changed to 30 misses ring 1; the third block's x changed to -18 misses ring 3; the fourth block's alt changed to 60 skips ring 4.

QuestionAnswerWhy
1Balt is the altitude, the height. The other two numbers are x, left and right, and y, forward.
2AEach fly to block aims at one ring. Moving that block's x sends the drone beside ring 5, and the other blocks still aim at their rings.
3The second fly to block. Look for a number that does not match ring 2: its x, its y or its altFull credit for naming the second fly to block and one of its numbers to check.

Rubric

Score each row from 1 to 4.

Name: ______________________________

Criteria4 Exceeds3 Meets2 Approaching1 Beginning
Predicts, then testsEvery prediction was written before Run and has a result, and the student explains the one that surprised them most.Every prediction was written before Run and has a result.Results are written, but some predictions are missing or were written after Run.Numbers were changed, but nothing is written down.
Changes the program on purposeThe drone skips ring 4 and passes the other five, and the student can say why the change works.The drone skips ring 4 and passes the other five.The drone skips ring 4, but also misses another ring.The drone still flies through ring 4, or a block was deleted.
Reads the programFinds a partner's secret change by reading the blocks before Run, and names the ring it will make the drone miss.Predicts the right ring for a partner's secret change before Run, and fixes it.Finds the changed block only after Run shows the orange ring.Cannot yet say which block goes with which ring.

Total: ____ / 12. A score of 9 or more meets the objectives.

Standards

These CSTA 2017 standards describe programs as sequences of steps, and testing and debugging them. Students read and change a working block program, predict what each change will do, and fix the bugs a partner puts in.

FrameworkCodeGradesStandardHow the lesson meets it
CSTA 20171B-AP-103-5Create programs that include sequences, events, loops, and conditionals.Students change a program that runs a sequence of blocks from a start event, and make it fly a different route on purpose.
CSTA 20171B-AP-153-5Test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended.Students find the block a partner changed by reading the program and predicting the ring it misses, then fix it.
CSTA 20172-AP-176-8Systematically test and refine programs using a range of test cases.Students change one number at a time, predict the result before each run, and record what happened.
Common Core Math5.G.A.15Use a pair of perpendicular number lines, called axes, to define a coordinate system, with the intersection of the lines (the origin) arranged to coincide with the 0 on each line and a given point in the plane located by using an ordered pair of numbers, called its coordinates. Understand that the first number indicates how far to travel from the origin in the direction of one axis, and the second number indicates how far to travel in the direction of the second axis, with the convention that the names of the two axes and the coordinates correspond (e.g., x -axis and x -coordinate, y -axis and y -coordinate).Students explain that x and y in a fly to block are distances along two axes from the middle of the course, and predict where a changed number sends the drone.

Checked October 2026 against: CSTA 2017 progression chart, CSTA 2017 to 2026 crosswalk, Common Core State Standards, Grade 5 Geometry.

Optional: save student work in a free class

The whole lesson runs at the link on the worksheet, with no accounts and no sign-up. Work stays in the browser tab until it is closed.

To keep students' work, and see every student's program in one place, make a free class. It takes about ten minutes, once, and covers every lesson in this series: mytekdev.com/tools/class-setup

Students in a class open mytekdev.com/tools/drone-simulator/lessons/program-a-drone-through-the-rings/start instead of the worksheet link. Each one gets their own copy of the ring course, and the same link reopens it next time. A student who started at the worksheet link and then signs up keeps what they made.

The Drone Simulator is built on GEARS (GearsBot) by Cort Wee, open source under the GNU General Public License 3.0. Its blocks are Blockly, its 3D view is Babylon.js and its Python runs in Skulpt.