Studio build: make the program remember
Ākonga add a variable so their project responds to what the user types, and trace by hand what the variable holds at three points in the run.
- Coding Studio move: Hand-traced variable table checked against the running program
- Evidence it produces: A project that changes behaviour with input, and a correct trace of the stored value
Lesson 4: User Input & Variables: Asking Questions & Storing Data
Developing computational thinking through Scratch block coding, algorithms, and Te Ao Māori perspectives.
🎯 Ngā Whāinga Akoranga | Learning Intentions
What a variable is (a named container storing changing data in memory), user input sensing (the ask and wait block — whatever the user types lands in answer), and dynamic string concatenation.
Create variables for score, timer, or player name, capture user keyboard input, and display personalized sprite dialogue.
🎥 Media Anchor & Pedagogical Scaffold
Scratch — Getting User Input with Ask and Answer
Video Clip: Demonstrates how to use Scratch's "ask and wait" block to collect user input, store it, and check whether the answer is correct — practical and interactive.
🧠 1. Before Viewing (Activate & Predict)
How does a video game remember your player name or high score while you are playing?
👁️ 2. During Viewing (Watch With a Job)
- Watch the full clip and identify two blocks that work together: "ask and wait" (collects input) and "answer" (stores what was typed).
- Notice how a conditional check is used to respond differently to correct and incorrect answers — connect this to what you learned about if-then logic.
- After watching, build your own quiz: ask the user a question about your topic, store the answer, and give a personalised response.
🗣️ 3. After Viewing & Kaiako Move (Process & Apply)
Kaiako Move: Guide students through building a 'Whakawhanaungatanga Chatbot' that asks users their name, iwi/hometown, and favourite food.
Immediate Task: Complete Section 4 of your Digital Tech Logbook: Chatbot Script & Variable Memory Tracking.
⚡ Whakaoho | Do Now: Three Questions (10 mins)
Write down three questions you could ask a classmate to introduce themselves — one about their name or iwi, one about their hometown, one about their favourite food. Keep the paper: those questions become your chatbot's ask blocks in Activity 1.
📖 Activity 1: Build the Whakawhanaungatanga Chatbot (25 mins)
Build along with the projector: an ask and wait block stores whatever the user types in the answer sensor, and a say block uses join() to greet them by name. Add your other two questions, and keep each answer in its own variable created with Make a Variable so the chatbot can reuse it later. Test your partner's chatbot twice — once with normal answers, once typing something ridiculous — and watch what the variable is actually holding after each ask.
📝 Activity 2: Digital Tech Logbook & Code Reflection (20 mins)
Draft your formal Digital Tech Logbook entry for Lesson 4. Apply exact programming vocabulary (e.g., ask and wait, answer, variable, join, store, input) to explain your code decisions.
🏫 Kaiako Planning & Pedagogy Notes
Year 7 Curriculum Alignment: User input and variables (NZC Technology; Te Mātaiaho Phase 3) — asking, storing and reusing data gives Lesson 5's decisions something to test.