Langkau ke kandungan

    If Island

    Conditionals Umur 7–9

    Read if–else code that compares numbers, checks for odd and even, and combines two conditions.

    • Umur 7–9
    • 3 misi
    • Permulaan → Semakin mahir → Cabaran

    Year 3 conditionals look like real code: comparing numbers with > and <, checking whether a number is odd or even, and combining two conditions with “and”.

    Apa yang akan dipelajari anak anda

    • Evaluate conditions that compare numbers
    • Decide whether the THEN or ELSE part runs
    • Understand conditions joined with “and”

    True or false?

    Every condition is either true or false. “number > 5” is true when the number is 6 or more — but false when it is exactly 5. If Island includes these edge cases on purpose, because that is where real bugs hide.

    Contoh soalan

    Berikut ialah beberapa soalan seperti dalam misi pertama. Bolehkah anda menjawabnya?

    1. 1. The number is 11. What does the robot do?

      • say “High”
      • say “Low”
      Tunjuk jawapan

      Jawapan: say “Low”. “number < 14” is true, so the robot runs the “then” part: say “Low”.

    2. 2. The number is 10. What does the robot do?

      • say “Hooray!”
      • say “Try again!”
      Tunjuk jawapan

      Jawapan: say “Hooray!”. “number > 9” is true, so the robot runs the “then” part: say “Hooray!”.

    3. 3. The number is 11. What does the robot do?

      • say “Small!”
      • say “Big!”
      Tunjuk jawapan

      Jawapan: say “Big!”. “number < 8” is false, so the robot runs the “else” part: say “Big!”.

    4. 4. Match each IF to its THEN.

      • IF temperature > 30
      • IF temperature < 15
      • IF it is night
      • THEN turn on the fan
      • THEN turn on the lights
      • THEN turn on the heater
      Tunjuk jawapan

      Jawapan: IF it is night → THEN turn on the lights · IF temperature < 15 → THEN turn on the heater · IF temperature > 30 → THEN turn on the fan. Smart homes use conditions like these.

    Tip untuk orang dewasa

    • Play “true or false?” with number statements like “7 is bigger than 9”.
    • Invent game rules that use “and”: you score if you hop and clap at the same time.