Navigasi Materi

Scratch ( materi 6)

Scratch Materi 6 - Variables, Input & Interaction

🐱 Scratch Materi 6

Variables + Input & Interaction

Berinteraksi dengan Pengguna

Interacting with the User

🎯 Tujuan Pembelajaran / Learning Objectives

⌨️ Input

🇮🇩 Memahami bagaimana program menerima input dari pengguna.

🇬🇧 Understand how a program receives input from the user.

💬 Ask & Answer

🇮🇩 Memahami hubungan antara ask dan answer.

🇬🇧 Understand the relationship between ask and answer.

📦 Variable

🇮🇩 Menyimpan input pengguna ke dalam Variable.

🇬🇧 Store user input in a Variable.

📚 Konsep Dasar / Basic Concept

Pada Materi 5 kita belajar bahwa Variable dapat menyimpan nilai. Sekarang kita membuat nilai tersebut berasal dari pengguna.

In Lesson 5, we learned that a Variable can store a value. Now we will make the value come from the user.

when green flag clicked
ask What's your name? and wait
set name to answer

User → Input → Answer → Variable → Output

⌨️ Ask and Answer

🇮🇩 Block ask [ ] and wait digunakan untuk meminta informasi dari pengguna.

🇬🇧 The ask [ ] and wait block asks the user for information.

when green flag clicked
ask What's your name? and wait

Setelah pengguna menjawab, Scratch menyediakan jawaban tersebut melalui reporter answer.

📦 Answer → Variable

Jawaban pengguna dapat disimpan ke dalam Variable.

when green flag clicked
ask What's your name? and wait
set name to answer

🔎 Answer Langsung vs Variable

Ini adalah perbedaan penting pada Materi 6.

Challenge 3

answer → output

ask What's your name? and wait
say Hello, answer

Answer digunakan langsung untuk menghasilkan output.

Challenge 4

answer → Variable → output

ask What's your name? and wait
set name to answer
say Hello, name

Answer disimpan dahulu ke Variable.

💬 Input → Process → Output

INPUT

User memberikan data.

PROCESS

Program mengolah data.

OUTPUT

Program memberikan hasil.

🧩 Scratch Vocabulary

Input
Data yang diberikan pengguna.
Ask
Meminta informasi.
Answer
Jawaban pengguna.
Variable
Tempat menyimpan data.
Interaction
Interaksi program dan pengguna.
Output
Hasil yang diberikan program.

🖱️ Practice Area — Talk to the Sprite!

🇮🇩 Coba sendiri hubungan antara input, answer, dan variable.

🇬🇧 Explore the relationship between input, answer, and variable.

⌨️ User Input

Click "Ask My Name".
Practice Stage
name
-
answer
-
🐱
Waiting for input...

⭐ Challenges — Build Your Script!

Drag & Drop → Script Area → Run → Stage → Check

⭐ Challenge 1 — Ask the User

🇮🇩 Buat Sprite menanyakan nama pengguna.

🇬🇧 Make the Sprite ask for the user's name.

🧱 Block Library
when green flag clicked
ask What's your name? and wait
📝 Script Area
Drag blocks here
Build your script.
🎬 Stage — User Input
Challenge 1
🐱
Waiting for script...

⭐ Challenge 2 — Store the Answer

🇮🇩 Minta nama pengguna, lalu simpan jawabannya ke Variable name.

🇬🇧 Ask for the user's name, then store the answer in the Variable name.

🧱 Block Library
when green flag clicked
ask What's your name? and wait
set name to answer
📝 Script Area
Drag blocks here
Build your script.
📦 Stage — Variable
Challenge 2
answer
-
name
-
🐱
Waiting for script...

⭐ Challenge 3 — Use the Answer

🇮🇩 Gunakan answer langsung untuk menyapa pengguna. Tidak menggunakan Variable.

🇬🇧 Use answer directly to greet the user. Do not use a Variable.

🧱 Block Library
when green flag clicked
ask What's your name? and wait
say Hello, answer
📝 Script Area
Drag blocks here
Build your script.
💬 Stage — Answer Output
Challenge 3
🐱
Waiting for script...

⭐⭐ Challenge 4 — Variable Greeting

🇮🇩 Simpan jawaban ke Variable name, kemudian gunakan Variable tersebut untuk menyapa pengguna.

🇬🇧 Store the answer in the Variable name, then use the Variable to greet the user.

🧱 Block Library
when green flag clicked
ask What's your name? and wait
set name to answer
say Hello, name
📝 Script Area
Drag blocks here
Build your Variable greeting.
🎮 Stage — Variable Greeting
Challenge 4
name
-
🐱
Waiting for script...

💭 Reflection / Refleksi

Centang pernyataan yang sudah dapat kamu lakukan.
Check the statements you can already do.

📝 Mini Quiz

1. Apa fungsi ask and wait?
What does ask and wait do?
2. Di mana jawaban pengguna tersedia setelah ask and wait?
Where is the user's response available after ask and wait?
3. Apa perbedaan Challenge 3 dan Challenge 4?
What is the difference between Challenge 3 and Challenge 4?
4. Apa fungsi set name to answer?
What does set name to answer do?
5. Urutan yang tepat untuk Challenge 4 adalah...
What is the correct sequence for Challenge 4?

🚀 Next Lesson

Materi 7 — Conditional Statements

🇮🇩 Kita akan belajar bagaimana program mengambil keputusan menggunakan if / then.

🇬🇧 We will learn how programs make decisions using if / then.