STEM Block-Based & Text Coding 2 — Questions and Answers
Question 1: A student drags a 'repeat 10 times' block around a 'move 10 steps' block in Scratch. What programming concept does this demonstrate?
- Recursion
- Iteration (Correct answer)
- Branching
- Decomposition
Correct answer: Iteration
Wrapping actions in a repeat block demonstrates iteration, executing the same steps multiple times in a loop.
Question 2: Which of the following best describes the purpose of transitioning students from Scratch to Python?
- Python has more colorful blocks than Scratch
- Python runs faster on school computers
- Students move from visual syntax to text-based syntax for more complex programs (Correct answer)
- Scratch cannot handle mathematical operations
Correct answer: Students move from visual syntax to text-based syntax for more complex programs
Transitioning to Python helps students move beyond visual block constraints to text-based syntax capable of handling more sophisticated programs.
Question 3: In block-based coding, a 'forever' loop block most closely maps to which Python construct?
- for i in range(10):
- while True: (Correct answer)
- if x == True:
- def forever():
Correct answer: while True:
A 'forever' block runs indefinitely, which maps directly to a 'while True:' loop in Python.
Question 4: A teacher wants students to debug a Scratch project where a sprite never reaches its destination. Which block category should students examine first?
- Sound blocks
- Motion blocks (Correct answer)
- Looks blocks
- Events blocks
Correct answer: Motion blocks
Motion blocks control sprite movement and position, so they are the logical starting point when a sprite fails to reach its destination.
Question 5: What is the primary advantage of using block-based environments like Scratch for introducing coding to elementary students?
- They teach professional industry standards immediately
- They eliminate syntax errors so students focus on logic (Correct answer)
- They are faster to execute than text-based languages
- They automatically generate documentation
Correct answer: They eliminate syntax errors so students focus on logic
Block-based environments eliminate syntax errors by snapping valid blocks together, letting students focus on computational thinking and logic.
Question 6: A student uses a 'when green flag clicked' block in Scratch. This is an example of which programming concept?
- Variable declaration
- Event-driven programming (Correct answer)
- Object-oriented inheritance
- Functional programming
Correct answer: Event-driven programming
The 'when green flag clicked' block triggers code in response to a user action, which is the defining feature of event-driven programming.
Question 7: When converting a Scratch 'if-else' block to Python, which syntax correctly represents the else branch?
- elif:
- else: (Correct answer)
- elseif:
- otherwise:
Correct answer: else:
In Python, the 'else:' keyword introduces the branch that runs when the if condition is false, matching Scratch's else section.
A student drags a 'repeat 10 times' block around a 'move 10 steps' block in Scratch.
What programming concept does this demonstrate?