Let Score = 12 and Lives = 0. What is the result of: (Score > 10) AND (Lives > 0)?
- A) True
- B) False
- C) 12
- D) Error
Answer & Explanation: B) False — Score > 10 is True, but Lives > 0 is False. AND requires BOTH sides to be True ⇒ False.
Master If-Then-Else branching, compound AND/OR/NOT Boolean expressions, and tracing Scratch "repeat until <condition>" loops where execution stops as soon as the condition becomes true.
Theory Snapshot: In Scratch, "repeat until <condition>" STOPS the instant the condition turns TRUE (whereas C++ `while` keeps running while true).
Answer & Explanation: B) False — Score > 10 is True, but Lives > 0 is False. AND requires BOTH sides to be True ⇒ False.
Answer & Explanation: A) True — OR evaluates to True whenever at least one condition is True (12 > 10 is True).
setează [n] la (2)
repetă până când <(n) > (10)>
modifică [n] cu (3)
sfârșit
Answer & Explanation: 11 — n steps 2 → 5 → 8 → 11. At n = 11, 11 > 10 becomes True so "repeat until" exits!
Answer & Explanation: B) False — False. Branches are mutually exclusive: only A runs if True, or only B if False.
Answer & Explanation: A) forever [ if <touching [Flag]?> then say "You win!" ] — Wrapping `if <touching Flag?>` inside a `forever` loop continuously checks for collision.
| Section | Evaluated Competency | Points |
|---|---|---|
| Part I (2 × 18 pts) | Evaluating AND / OR Boolean expressions | 36p |
| Part II (2 × 18 pts) | Tracing repeat-until & mutual exclusion of if/else | 36p |
| Part III (18 pts) | Real-time Scratch sensor collision loop | 18p |
| Ex officio | Baseline points | 10p |
| TOTAL (Grade = Score / 10) | 100p | |