🧠Concept
Pick the right answer.
saved holds your moves. How do you take back the newest move?messages holds [A, B, C] (A added first). You run this. What is result and what remains?set [result v] to (item (1) of [messages v]) delete (1) of [messages v]
length of [saved] > 0 before taking an item?👀Code Reading
Look at the blocks. Predict what happens.
saved in order: "X", "Y", "Z". What is result after this script runs?delete all of [saved v] add [X] to [saved v] add [Y] to [saved v] add [Z] to [saved v] set [result v] to (item (length of [saved v]) of [saved v]) delete (length of [saved v]) of [saved v]
messages in order: "X", "Y", "Z". What is result after this script runs?delete all of [messages v] add [X] to [messages v] add [Y] to [messages v] add [Z] to [messages v] set [result v] to (item (1) of [messages v]) delete (1) of [messages v]
saved. What is the bug?set [result v] to (item (1) of [saved v]) delete (1) of [saved v]
🐛Find the Bug
Something is broken. Pick the fix.
This should take the last item from saved, but it says a blank when saved is empty. What is the fix?
set [result v] to (item (length of [saved v]) of [saved v]) delete (length of [saved v]) of [saved v] say (result) for (2) secs
🛠️Build It
Pick a level. Build it. Check the boxes.
Add to a list, then take the last.
More
Build an undo list. Create a list saved. On flag click, delete all of saved. Use key presses like the lesson did: the P key adds a value to the end of saved, and the O key takes the last item (reads it into result, then deletes it) and says it. Add an empty-check before every take.
Done when
On flag click saved is cleared. P key adds to the end. O key takes the last item (not item 1) into result and says it. An empty-check (if length of saved > 0) runs before every take.
Take from the front of a message list.
More
Build a message list alongside the undo list. Add an add_back custom block (adds to the end of messages) and a take_first custom block (reads item 1 of messages into result, then deletes item 1). Wire the E key to add_back and the D key to take_first. Show both the saved and messages list monitors on stage.
Done when
add_back adds to the end. take_first reads item 1 then deletes item 1. E key adds, D key takes the first. Both blocks have empty-checks. Both monitors are visible on stage.
Undo the last move with two lists.
More
Build a 2D undo with two lists, like the full position saver in the lesson: saved_x and saved_y. Do these steps: 1) On flag click, delete all of both lists. 2) On each arrow-key move, add x position to saved_x and y position to saved_y. 3) On U key, take the last item of each list and set the sprite to that x, y. 4) Guard every take with if <(length of saved_x) > (0)>.
Done when
1) Each move adds x to saved_x and y to saved_y. 2) U takes the last item of both lists and sets the sprite back to that x, y — one full 2D move undone per press. 3) An empty-check (if length of saved_x > 0) runs before taking.
Review the student's project, then check each thing they did.
Project Evaluation
0 of 4 ticked
💬Talk About It
Present your project to your teacher or a classmate.
- 1️⃣Show your
savedandmessagesmonitors. - 2️⃣Add and take items.
- 3️⃣Point to which item leaves first from each.
Watch the student present, then check each thing they did.
Presentation Checklist
0 of 4 ticked
📤Submit
Send your results to your teacher and parent.
0 of 0 answered