🐱 Scratch for Kids · Lesson 5 of 7
Conditions: “if… then”
The apple falls, and if it touches the basket, something happens.
If… then
A condition lets the program decide: “if the apple touches the basket, then…”. The “if then” block is in Control, and “touching ___?” is in Sensing.
The falling apple
- when green flag clicked → go to x: (pick random -200 to 200) y: 170
- forever
- change y by -5 (falls down)
- if touching Basket? then → start sound Pop → go to x: (pick random -200 to 200) y: 170
- if y position < -170 then → go to the top again (missed!)
Random
“pick random -200 to 200” (Operators, green) makes the apple start in a different place each time. Without it, the game is too easy.
Tip
💡 Want it harder? Change “change y by -5” to -8. Bigger number = faster apple.
✏️ Practice: your turn
- Make the apple fall from a random spot
- When it touches the basket: a sound and back to the top
- When it reaches the bottom: back to the top
- Try different speeds
🧠 Quick quiz
Answer all 4 questions correctly to mark this lesson as done.
0 of 4 correct
All lessons in Scratch for Kids
- 🚩 1. Getting started: sprite, stage and green flagOpen a project and make the cat move and talk
- 🔁 2. Loops: doing things again“repeat” and “forever” — the cat bounces between the walls
- ⌨️ 3. Keyboard controlsMove a sprite with the arrow keys
- 🎵 4. Costumes, backdrops and soundsSimple animation, a stage backdrop and a sound for each action
- 🍎 5. Conditions: “if… then”The apple falls, and if it touches the basket, something happens
- 🔢 6. Variables: score and timeCount apples, and a 30-second timer
- 🏆 7. A complete game, and sharing itFinish up, add a level and share with friends