Skip to content

Script Anatomy

Run the Script Anatomy MicroSim Fullscreen
Edit in the p5.js Editor

About This MicroSim

This MicroSim displays a simple five-block Scratch script (when green flag clicked, move 10 steps, turn 15 degrees, say Hello! for 2 secs, and wait 1 secs) drawn with the same hat and stack puzzle-piece shapes used in Scratch. It helps students see that scripts run in order from top to bottom, and that each block's shape signals its role in the script.

How to Use

  • Hover your mouse over any block in the script to highlight it (an orange outline) and reveal its description near the bottom of the drawing area.
  • Use the "Show Descriptions" checkbox to turn the hover description text on or off.

Iframe Embed Code

You can add this MicroSim to any web page by adding this to your HTML:

<iframe src="https://dmccreary.github.io/scratch-textbook/sims/script-anatomy/main.html"
        height="415px"
        width="100%"
        scrolling="no"></iframe>

Lesson Plan

Grade Level

Grades 3-6 (ages 8-12)

Duration

10-15 minutes

Prerequisites

Has toured the Scratch editor and can point to the Stage, Blocks Palette, and Code Area (covered earlier in this chapter). Knows that a sprite is a character you can program and that blocks snap together to form a script. No prior programming experience is assumed — this diagram introduces the very first script in the course.

Activities

  1. Exploration (5 min): With "Show Descriptions" checked, students hover over each of the five blocks in order — when green flag clicked, move 10 steps, turn 15 degrees, say Hello! for 2 secs, wait 1 secs — and read what each one does.
  2. Guided Practice (5 min): Students uncheck "Show Descriptions" and, with a partner, narrate the script from top to bottom in their own words, predicting what the cat does at each step before re-checking the box to confirm.
  3. Assessment (5 min): Students point out which single block is the hat block and which four are stack blocks, and explain why a hat block can only ever go on top.

Assessment

Student can correctly distinguish the hat block from the four stack blocks in the diagram and can describe, in order, what each of the five blocks does when the green flag is clicked.

References

  1. Your First Script — Chapter 1: Welcome to Scratch
  2. Hat Block — Scratch Wiki