MIT App inventor. Introduce these blocks used to middle school learners so they can write the program by thensleves ---**Chart/Diagram Description:** * **Type:** This is a visual programming block diagram, typical of block-based programming environments (e.g., MIT App Inventor, Scratch). It represents an event handler and a function call. * **Main Elements:** * **Event Handler Block:** The outermost block is a large, gold-brown colored block with rounded corners at the top and a notched shape at the bottom, indicating it can contain other blocks. * **Event Trigger (Top Section):** It starts with the keyword "when" followed by "Canvas1" (which has a dropdown indicator) and then ".Dragged". This signifies that the code inside will execute when a "Canvas1" object is "Dragged". * **Event Parameters:** Eight smaller, light orange-brown rounded-rectangle blocks are horizontally attached to the "when" part, representing the parameters passed by the "Dragged" event: "startX", "startY", "prevX", "prevY", "currentX", "currentY", and "draggedAnySprite". * **Action Section:** Below the "when" part, the keyword "do" indicates the start of the actions to be performed when the event is triggered. * **Function Call Block:** Nested within the "do" section of the event handler is a large, purple-colored block with a rounded bottom and puzzle-piece-like connectors on its right side. * **Function Call Label:** It contains the text "call Canvas1" (with a dropdown indicator for "Canvas1") and then ".DrawLine". This indicates a call to the "DrawLine" method of the "Canvas1" object. * **Function Arguments/Inputs:** Inside the "DrawLine" block, there are four input fields labeled vertically: "x1", "y1", "x2", "y2". * **Argument Values:** Attached to each input field on the right side, via puzzle-piece connectors, are smaller, orange-brown "get" blocks (also with dropdown indicators), which retrieve the values of the event parameters: * "x1" is set to "get prevX" * "y1" is set to "get prevY" * "x2" is set to "get currentX" * "y2" is set to "get currentY" **Textual Information:** * **Question Stem (Implicit Functionality):** This block of code defines an event handler for a "Canvas1" object. When the `Canvas1` object is dragged, a line will be drawn on it. The line will be drawn from the previous touch position (`prevX`, `prevY`) to the current touch position (`currentX`, `currentY`). * **Code Block Structure (As Plain Text):** ``` when Canvas1 .Dragged (Parameters: startX, startY, prevX, prevY, currentX, currentY, draggedAnySprite) do call Canvas1 .DrawLine x1: get prevX y1: get prevY x2: get currentX y2: get currentY ```

视频信息