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. True or false? In “IF it is cold THEN wear a coat”, you wear a coat only when it is cold.
Tunjuk jawapan
Jawapan: Betul. The THEN part only happens when the condition — it is cold — is true.
3. 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.
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.