🐱 Scratch Materi 7
Conditional Statements
Percabangan dan Pengambilan Keputusan
Making Decisions with Code
🎯 Tujuan Pembelajaran / Learning Objectives
🔎 Condition
🇮🇩 Siswa memahami apa yang dimaksud dengan kondisi.
🇬🇧 Students understand what a condition is.
↪️ If Then
🇮🇩 Siswa dapat menggunakan if then.
🇬🇧 Students can use if then.
🔀 If Else
🇮🇩 Siswa dapat membuat program dengan dua kemungkinan.
🇬🇧 Students can create programs with two possible outcomes.
📚 Apa itu Conditional Statement?
🇮🇩 Dalam kehidupan sehari-hari kita sering membuat keputusan berdasarkan suatu kondisi.
Contoh:
Dalam programming, kita dapat menuliskan ide yang sama menggunakan if ... then.
🇬🇧 In programming, we can express the same idea using if ... then.
🔎 Condition
Condition adalah sesuatu yang dapat bernilai true atau false.
A condition can be either true or false.
TRUE ✅
The condition is correct.
Program menjalankan perintah.
FALSE ❌
The condition is not correct.
Program tidak menjalankan perintah di dalam if.
↪️ If Then
Struktur dasar:
Artinya:
If the condition is true, execute the command.
🔀 If Then Else
Kadang-kadang kita membutuhkan dua kemungkinan.
🇬🇧 Sometimes we need two possible outcomes.
Jadi:
TRUE : first action | FALSE : second action
🧮 Comparison Operators
Condition sering dibuat menggunakan comparison operators.
greater than
lebih besar dari
less than
lebih kecil dari
equal to
sama dengan
🧩 Scratch Vocabulary
Kondisi yang dapat bernilai true atau false.
Jika.
Maka / lakukan.
Jika tidak.
Benar.
Salah / tidak terpenuhi.
🖱️ Practice Area — Make a Decision!
🇮🇩 Coba ubah kondisi dan lihat bagaimana Sprite mengambil keputusan.
🇬🇧 Change the condition and see how the Sprite makes a decision.
🎚️ Score
Condition
if score >= 70 then
⭐ Challenges — Build Your Conditional Program!
Drag & Drop : Script Area : Run : Stage : Check
⭐ Challenge 1 — Simple If
🇮🇩 Buat Sprite mengatakan Great! jika score lebih besar dari 70.
🇬🇧 Make the Sprite say Great! if the score is greater than 70.
⭐ Challenge 2 — Change the Condition
🇮🇩 Buat program yang mengatakan Keep Trying! jika score tidak lebih dari 70.
🇬🇧 Make the program say Keep Trying! if the score is not greater than 70.
⭐⭐ Challenge 3 — If Then Else
🇮🇩 Buat Sprite mengatakan Great! jika score ≥ 70, dan Keep Trying! jika tidak.
🇬🇧 Make the Sprite say Great! if score ≥ 70, and Keep Trying! otherwise.
⭐⭐ Challenge 4 — Mini Decision Program
🇮🇩 Buat program keputusan sederhana: jika score ≥ 75, Sprite mengatakan "Excellent!". Jika tidak, Sprite mengatakan "Keep Practicing!".
🇬🇧 Create a simple decision program: if score ≥ 75, the Sprite says "Excellent!". Otherwise, the Sprite says "Keep Practicing!".
💭 Reflection / Refleksi
Centang pernyataan yang sudah dapat kamu lakukan.
Check the statements you can already do.
📝 Mini Quiz
🚀 Next Lesson
Materi 8 — Loops / Repetition
🇮🇩 Kita akan belajar membuat Sprite mengulang perintah menggunakan repeat dan forever.
🇬🇧 We will learn how to repeat commands using repeat and forever.