Programs make decisions with IF–THEN–ELSE. IF a condition is true, THEN do one thing, ELSE do something different. Children already use this logic every day — “if it’s raining, then take an umbrella”.
Apa yang akan dipelajari anak anda
- Understand IF–THEN rules
- Know that ELSE runs when the condition is false
- Work out what a program does in a given situation
- Recognise what a condition is
Everyday decisions
If Island starts with everyday rules, then moves on to reading real if–else code blocks. Children learn that a condition is a question with a yes-or-no answer, and that the program follows one path or the other.
Contoh soalan
Berikut ialah beberapa soalan seperti dalam misi pertama. Bolehkah anda menjawabnya?
1. IF you are hungry THEN…
🍽️- Brush your hair
- Go to sleep
- Eat some food
- Have a bath
Tunjuk jawapan
Jawapan: Eat some food. Being hungry is the condition. Eating is what happens when it is true.
2. IF it is raining THEN…
🌧️- Fly a kite 🪁
- Go swimming 🏊
- Wear sunglasses 🕶️
- Take an umbrella ☂️
Tunjuk jawapan
Jawapan: Take an umbrella ☂️. Rain means you need an umbrella — that’s the THEN part of the rule.
3. IF the ball goes in the goal THEN…
⚽- Stop the game
- Score a point
- Pop the ball
- Lose a point
Tunjuk jawapan
Jawapan: Score a point. In football, the ball in the goal means a point is scored.
4. Put the IF block in order.
- ELSE wear a T-shirt
- IF it is cold
- THEN wear a coat
Tunjuk jawapan
Jawapan: IF it is cold → THEN wear a coat → ELSE wear a T-shirt. IF comes first, then THEN, then ELSE.
Tip untuk orang dewasa
- Play “if–then” games: “If I touch my nose, then you jump.”
- Talk about the rules of games you play — many are if–then rules.