Repeat & Forever
Spin a wind turbine with loops.
Repeat & Forever 🔁
What if you want to do something again and again? Use a loop! Loops are orange Control blocks.
Repeat a few times
when flag clicked repeat (4) move (50) steps turn right (90) degrees end
The blocks inside the repeat block happen 4 times. The sprite walks in a square! ⬜
Forever means... forever!
when flag clicked forever turn right (5) degrees end
This spins and spins until you click the 🛑 stop sign.
🌬️ A wind turbine
Wind turbines spin in the wind and make clean electricity, with no smoke! Let's make one:
when flag clicked forever turn right (10) degrees wait (0.05) seconds end
🛠️ Build it!
- Click Paint 🖌️ to draw a turbine: 3 long blades from the middle, like a ✳️ star.
- Build the turbine script.
- Click the 🟢 flag. Wheee!
⭐ Bonus: make the turbine spin faster. Which number should you change?
💨 Fun fact
One big wind turbine can make enough electricity for hundreds of homes!
Build it in Scratch!
Open Scratch in a new tab, find the blocks shown above (they're the same colors!), snap them together and click the green flag. Then try the challenge ideas in the lesson.
Open Scratch ↗Scratch is free and made by MIT for kids. You can build without an account. To keep a project, ask a grown-up to help you sign in, or use File → Save to your computer.
Quick check
repeat (3) move (10) steps end