โ† Home BP ยท 7-9 ๐Ÿ’“

Pulse Loop Lab

18
๐ŸŽฏ Today's Missions
โœš โœš ๐Ÿ’Š ๐Ÿฉบ
๐Ÿ’“
Hospital Tech Universe
Pulse Loop Lab
You're the Vitals Medic! Program the heart monitor to REPEAT a step โ€” beep a heart, give a pill, check a temp โ€” as many times as you say. Press RUN and let the loop do the work!

๐Ÿ” Today's Concept: Loops

A loop tells the computer: "do this step, then do it AGAIN, until you've done it a set number of times." Instead of writing "beep" five separate times, you write it once and say repeat 5. The computer counts each round for you โ€” that count is the heartbeat of every loop!

๐Ÿงฑ body โ€” the step that repeats ๐Ÿ”ข count โ€” how many times โฑ๏ธ run โ€” watch it loop!
โ† Last time you made code CHOOSE with if / else (Desert Decisions). Today you'll make code REPEAT with a loop!
Step 1 / 4
Beep the heart 3 times! Pick ๐Ÿ’“ Heart, set the count to 3, then press RUN.
โ— LIVE โ€” Heart Monitor
๐Ÿ’“
loop count i
0 / 3
โ–ผ Loop output tray
Press START to begin your loopโ€ฆ
Ready.
๐Ÿงฑ LOOP BODY what step repeats?
๐Ÿ”ข REPEAT COUNT how many times?
repeat
ร—3
๐Ÿ“‹ Your 4 Loop Challenges
0 of 4 challenges complete
๐Ÿ’“
Loop Complete โ€” You're a Vitals Pro!
You taught the computer to REPEAT with loops. One line, many runs โ€” that's the magic of a loop! ๐Ÿฉบ

๐Ÿ’ซ What You Learned

  • A loop repeats one step many times โ€” write it once, run it N times.
  • The body is what repeats (beep a heart, give a pill). You can swap it freely.
  • The count controls how many times it runs. Change the number, change the output.
  • A loop obeys you exactly โ€” a wrong count means a wrong result (that's how bugs happen!).
  • The counter i ticks up each round: 1, 2, 3โ€ฆ that's how the loop keeps track.
๐ŸŽฌ Come Back Tomorrow!
Next up: store your own values in named boxes and use them to power bigger programs โ€” meet variables and functions that reuse your logic!
๐Ÿ  Home
Nice! ๐ŸŽ‰