Telescope Lab: The Sky Moves, Tracking, Loops and Events
Level 3 of Telescope Lab asks students to keep Saturn in a backyard telescope's view for 3 minutes. The starter points the telescope and waits, and Saturn drifts out of the view in 53 seconds: the sky turns 15 arcseconds every second, and the telescope stands still. Students fix it three ways in Blocks and compare them. Tracking turns the telescope with the sky and passes. A when block that points again when Saturn drifts out brings it back every time, but only after it has gone, so the count starts again and the level never passes. A forever loop that points again and waits passes if the wait is short enough, and students test waits to find where it stops working.
At a glance
Essential question
How should a program keep up with something that is always moving?
Objectives
Students will be able to:
- explain why a target drifts out of a telescope that stands still
- add an event handler (a when block) and describe when it runs
- write a forever loop that repeats an action on a timer
- test a loop's wait at several values and find where it fails
- compare reacting to a problem with preventing it, and say which the goal needs
Vocabulary
Event, Loop, Tracking, Drift, Field of view, Test case
Standards
2-AP-12, 2-AP-13, 2-AP-17
Time and materials
45 minutes, grades 6-8.
- One computer or Chromebook per student
- A projector
- The worksheet and exit ticket, one copy each per student
- The rubric, one copy per student if you grade the work
Prep
Make copies of the worksheet and exit ticket. Before class, open mytekdev.com/try/telescopelab?lesson=the-sky-moves-tracking-loops-and-events&ref=tpt-telescopelab-2 once on a student computer, which checks that your school's filter allows the app, and follow the short guide yourself: about ten minutes.
Assessment
- Formative: the questions under What to look for, asked while students work, and the exit ticket (answer key included).
- Summative: the worksheet, scored with the rubric.
Technology and privacy
Runs in any browser, Chromebooks included, with nothing to install. Students need no account and no email: the link works signed out, and nothing they do is stored on our server unless they choose to save.
mytekdev.com/try/telescopelab?lesson=the-sky-moves-tracking-loops-and-events&ref=tpt-telescopelab-2mytekdev.com/tools/telescope-lab/lessons/the-sky-moves-tracking-loops-and-events/startEach student gets their own copy, and the same link reopens it next time. How to set up a classLesson sequence
| Minutes | Stage | What you do | What students do |
|---|---|---|---|
| 0 to 5 | Warm-up Hook | Show the title, essential question and Today I can slides (about 1 minute). Then the warm-up: filming a merry-go-round from a tripod. | Answer the warm-up on the worksheet. |
| 5 to 12 | Direct instruction (I do) Model it | Project Level 3. The night is 16 February 2027 in a sample backyard on the edge of Denver, not where anyone in the class is. The backyard is in the middle: the deck, the trees, the telescope and Saturn above them. The eyepiece view is on the right: the big circle is what your eye would see, the small one the whole view to scale, with the magnification, the sky across and the air's blur under them. The box at the top left says the level's goal and, after each run, what happened, with the run's own numbers. Read the starter blocks aloud: when started, point at Saturn, use the 10 mm eyepiece, wait 180 seconds. Ask what will happen, then press play and Speed up. Saturn slides to the edge and out; the box says it left after 53 seconds. Show the stat slide. It's working when: The 10 mm shows 0.43 degrees, 1560 arcseconds across, so the edge is 780 arcseconds from the middle. Add Saturn's own 19 and divide by 15: about 53 seconds. | Predict, watch, and fill in the vocabulary on the worksheet. |
| 12 to 20 | Guided practice (We do) Watch it go, then track | Students open the link or scan the QR code. A short guide runs the starter until Saturn drifts out, then has them add turn tracking on and play again: the box counts to 180 seconds and the level passes, held by tracking. Watch for: Students who put turn tracking on below wait 180. It must run before the long wait, or it comes too late. | Follow the guide. Record the time Saturn left and the tracking result. |
| 20 to 37 | Independent practice (You do) Two more fixes | Students take tracking out (drag it to the bin) and try the when block: from Events, when the target drifts out of the view, with point at Saturn under it, beside the starter. Then they take that out and replace wait 180 with a forever loop holding point at Saturn and wait 20. Then they test the loop's wait at 10, 30, 50, 55 and 60. The round play button runs the program from the start of the night; Speed up and Slower, at the bottom, change how fast the night goes (up to 10 times in the backyard). A program's seconds are the night's seconds at any speed. Walk the room with the What to look for questions. If they ask: "With the when block, watch the count in the box when Saturn comes back. What happens to it, and why does that matter for the goal?" The count Watch for: Students who think the when block "does not work". It works exactly as written: it points again each time Saturn drifts out. The goal needs Saturn never to leave. | Fill in the fixes table and the waits table, and answer the questions. |
| 37 to 45 | Closure React or prevent? And exit ticket | Show the closure slide and take answers. Then name the parts of the job: point at the target, notice when it moves, put it back. Each fix does the last part a different way. Hand out the exit ticket. | Discuss, then answer the exit ticket. |
Before you teach: a ten-minute walkthrough
Open mytekdev.com/try/telescopelab?lesson=the-sky-moves-tracking-loops-and-events&ref=tpt-telescopelab-2. A short guide opens over Level 3, The sky moves. The night is 16 February 2027 in a sample backyard on the edge of Denver, not where anyone in the class is. The backyard is in the middle: the deck, the trees, the telescope and Saturn above them. The eyepiece view is on the right: the big circle is what your eye would see, the small one the whole view to scale, with the magnification, the sky across and the air's blur under them. The box at the top left says the level's goal and, after each run, what happened, with the run's own numbers.
- The goal. Keep Saturn in the 10 mm (120 times) view for 3 minutes. The count in the box goes up while Saturn is anywhere in the view and starts again from 0 if it leaves.
- The starter. When started: point at Saturn, use the 10 mm eyepiece, wait 180 seconds. Saturn leaves the view 53 seconds after it is centered, the same on every run.
- Tracking. Turn tracking on, from Telescope, before the wait (above or below point at Saturn both work): done at 185 seconds, held by tracking.
- The when block. When the target drifts out of the view, from Events, sits on its own beside the starter, with point at Saturn under it. It runs each time Saturn leaves, and Saturn comes back, but the count has already started again: never done. In 5 minutes it is lost 5 times.
- The forever loop. Replace wait 180 with forever, holding point at Saturn and wait 20: done at 185 seconds, held by pointing again 9 times. The forever block adds 1 second of its own each time round. Waits of 10 to 50 pass; 55 and 60 let Saturn drift out first.
- Speed. The round play button runs the program from the start of the night; Speed up and Slower, at the bottom, change how fast the night goes (up to 10 times in the backyard). A program's seconds are the night's seconds at any speed. These times do not change from run to run.
Background for the teacher
Earth turns once in 23 hours 56 minutes, so the sky seems to turn 15 degrees an hour, 15 arcseconds every second. A telescope that stands still watches the sky go past, and the more it magnifies, the smaller its view and the sooner a planet leaves it: from the middle of the 10 mm view, 53 seconds; at 25 mm, over 2 minutes. Real telescopes have a tracking motor that turns them with the sky. Many backyard telescopes are pushed by hand, and their owners nudge them along every half minute or so, which is the forever loop.
The three fixes are three ways a program can keep up with something that changes. The when block is an event: it reacts after the change has happened. The loop is polling on a timer: it acts every so often whether or not anything changed, and its timer must be shorter than the time the problem takes to happen. Tracking removes the problem. A goal that says "never leave the view" needs prevention, not reaction, which is why the when block alone cannot pass.
Astronomers, telescope operators (the job this app is closest to), engineers who build cameras and adaptive optics, and data scientists who sort survey pictures all work with telescopes like these. Anyone can help with real data through citizen science projects such as Zooniverse and the AAVSO.
What to look for
Ask these while students work. A student who has understood the lesson can answer them without help:
- Why does Saturn leave a telescope that stands still?
- When does the when block run, and what does it do?
- Why does the count start again when the when block brings Saturn back?
- Which loop waits kept Saturn, and which did not?
- Which fix would you use on a real telescope, and why?
Cross-curricular extensions
- Earth science: photograph the night sky for 20 minutes with a phone on a tripod, or look up star trail photos. Why do the stars draw circles round one point?
- Math: the sky turns 360 degrees in about 24 hours. Show that this is 15 degrees an hour and 15 arcseconds a second.
- Computer science: list three things at home that react to an event (a doorbell) and three that run on a timer (a sprinkler). Which could miss something?
- Careers: look up what a telescope operator does during a night at an observatory.
Vocabulary
| Event | Something that happens while a program runs. A when block runs its blocks each time its event happens. |
| Loop | Blocks that run again and again. A forever loop never stops on its own. |
| Tracking | A motor that turns the telescope with the sky, so what it points at stays put. |
| Drift | The slow movement of the sky through a telescope that stands still: 15 arcseconds every second. |
| Field of view | How much sky the eyepiece shows. The 10 mm shows 0.43 degrees. |
| Test case | One value tried on purpose to see whether a program works, such as a wait of 20 or of 55. |
Differentiation
English learners
- Keep the vocabulary slide up, and point at the telescope, the eyepiece view or the box at the top as you say each word: the picture carries the meaning.
- Give a sentence frame on a card: The ____ fix kept Saturn for ____ seconds because ____.
- Act it out: one student walks slowly across the front of the room while another points at them, once with a timer and once only when they leave.
Students with IEPs or 504 plans
- Pair students, one at the keyboard and one recording results.
- Give the three fixes as pictures of the blocks, to copy.
- Where the IEP allows a modified assignment, score the first two rubric rows only.
Students who need more support
- Build the when block together on the projector before students try it.
- Test only three waits: 20, 50 and 60.
- The box says after every run how long Saturn stayed, and when it left.
Students ready for more
- Open the Python tab after building the when block. Find the function the block became and the line that hands it to scope.on().
- Put the 3 mm eyepiece in and time how long Saturn takes to drift out. Why is it so much shorter?
- Use the loop and the when block together. Does that pass? Explain with the count in the box.
Adapting for other grades
Younger students: In grades 4 and 5, run the starter and the tracking fix together on the board, then let pairs try the forever loop with waits of 20 and 60. Score the first two rubric rows, total 8, and 6 meets the objectives.
Older students: In high school, work in the Python tab: tracking is scope.track(True), the event is a function handed to scope.on('lost', when_lost), and the loop is while True. Compare polling with events (3A-AP-16), and when each is the right tool.
Telescope Lab: The Sky Moves, Tracking, Loops and Events
Student worksheet
Name: ______________________________ Date: ______________
Open the app: scan the QR code, or go to mytekdev.com/try/telescopelab?lesson=the-sky-moves-tracking-loops-and-events
Essential question: How should a program keep up with something that is always moving?
Warm-up: Filming a friend on a merry-go-round from a tripod: how do you keep them in the picture? ________________________
- Vocabulary. Event, loop, tracking, drift, field of view, test case: write each in your own words.
- The starter. Saturn left the view after ______ seconds.
- Three fixes. Tracking: done? ____ Count reached: ______. When block: done? ____ What happened to the count: ______________. Forever loop with wait 20: done? ____ Pointed again ______ times.
- Waits. Forever loop with wait 10: ______ 30: ______ 50: ______ 55: ______ 60: ______. The loop stops working between ______ and ______.
1. Why does the when block bring Saturn back but never pass the level?
2. Why does the loop stop working past a wait of about 50 seconds?
Telescope Lab: The Sky Moves, Tracking, Loops and Events
Exit ticket
Name: ______________________________
1. A telescope stands still. A planet in its view: (A) stays put (B) drifts out as the sky turns (C) gets bigger
2. A when block that runs when the target drifts out of the view runs: (A) before the target leaves (B) after it has left (C) once a second
3. A friend's program points again every 2 minutes, and the planet keeps escaping. Use what you learned today to say what to change, and why.
Answer key: exit ticket
| Question | Answer | Why |
|---|---|---|
| 1 | B | Earth turns, so the sky turns 15 arcseconds every second past a telescope that stands still. |
| 2 | B | An event runs after it happens: the target has already left. |
| 3 | Open answer | Point again more often than the planet takes to leave (under about 53 seconds in the 10 mm view), or turn tracking on so it never leaves. |
Worksheet: what students should find
| Blank | What the app shows |
|---|---|
| The starter | 53 seconds. |
| Three fixes | Tracking: done, 180. When block: not done; the count starts again from 0 each time Saturn leaves. Forever loop with wait 20: done, pointed again 9 times. |
| Waits | 10, 30 and 50: done. 55 and 60: Saturn drifts out, not done. The loop stops working between 50 and 55. |
| Question 1 | It runs only after Saturn has left the view, and leaving the view is what starts the count again. |
| Question 2 | Saturn leaves 53 seconds after it is centered; each time round, the loop takes its wait plus 1 second (the forever block's own) plus the moment to point. |
Rubric
Score each row from 1 to 4.
Name: ______________________________
| Criteria | 4 Exceeds | 3 Meets | 2 Approaching | 1 Beginning |
|---|---|---|---|---|
| Explaining the drift | Explains the drift with the sky's 15 arcseconds a second and the view's size, with numbers. | Explains that the sky turns and the telescope stood still. | Says Saturn moved, with no reason. | No explanation. |
| Building and comparing the fixes | Builds all three, records each result, and explains why the when block alone never passes. | Builds all three and records each result. | Builds one or two. | Builds none. |
| Testing the wait | Tests six waits, records each, and explains where the loop stops working and why. | Tests six waits and records each. | Tests one or two. | Does not test. |
Total: ____ / 12. A score of 9 or more meets the objectives.
Standards
The lesson is built for CSTA 2-AP-17: students test the loop's wait at six values, record each result and find where it stops working. Building the program three ways, with a loop and with an event, is 2-AP-12, and naming the parts of the job (point, notice, put back) is 2-AP-13.
| Framework | Code | Grades | Standard | How the lesson meets it |
|---|---|---|---|---|
| CSTA 2017 | 2-AP-12 | 6-8 | Design and iteratively develop programs that combine control structures, including nested loops and compound conditionals. | Students build the same goal three ways: a forever loop, an event handler beside the main program, and tracking, and compare how each behaves. |
| CSTA 2017 | 2-AP-13 | 6-8 | Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs. | Students split the job into pointing at the target, noticing it has moved and putting it back, and say which part each fix changes. |
| CSTA 2017 | 2-AP-17 | 6-8 | Systematically test and refine programs using a range of test cases. | Students test the loop's wait at 10, 20, 30, 50, 55 and 60 seconds, record each result, and find where it fails and why. |
Checked November 2026 against: CSTA K-12 Computer Science Standards, Revised 2017.
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.
To keep students' work, and see it all 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/telescope-lab/lessons/the-sky-moves-tracking-loops-and-events/start instead of the worksheet link. Each one gets their own copy of the starter, and the same link reopens it next time.