Skip to content
Cardinal Spellman High SchoolComputer Science Department
  • Study
  • Teacher tools
  • About

Cardinal Spellman High SchoolComputer Science Department

Developed by Farzin Khan Shifat

Go to the top of the page↑

Explore

  • Study
  • Teacher tools
  • My work
  • Department

Need help?

  • How studying works
  • Teacher guide
  • Request a tool
  • Report a problem

Your progress stays on this device. Vercel counts visits to public study pages, without your names, answers, files or grades. On a shared computer, use Forget my progress when you finish.

Study calculator

Drag this handle or use arrow keys to move the calculator. Home restores its position.

You can keep working on the page while this calculator is open. Closing keeps your calculations in this tab. Reloading clears them. This is Spellman’s study calculator, not a TI-84 emulator.

  1. ← All courses
  2. Computer Science
  3. Unit 4: Algorithms and Programming with Scratch

Lesson 2 of 3

Sequence and Tracing

Follow one block at a time from a known start

Lessons and study tools
PracticeKey wordsMy work
  1. Unit 1: Computer Hardware
    1. What Makes a Computer?
    2. Four Jobs of a Computer
    3. Data and Information
    4. CPU, RAM, and Storage
    5. Devices and Ports
    6. Choosing Hardware
    7. Hardware Review
  2. Unit 2: Computer and Internet Basics
    1. The Five Roles
    2. The Request Trip
    3. Local, Remote, and the Cloud
    4. Unit Review
  3. Unit 4: Algorithms and Programming with Scratch
    1. Sprites, Stage, and Scripts
    2. Current lessonSequence and Tracing
    3. Plan, Build, Explain
    4. Scratch So Far: Review
  4. Unit 5: Digital Representation and File Management
    1. Only Two Choices: Bits and Switches
    2. Counting in Binary
    3. Same Bits, Different Meaning
    4. Pictures, Sound and Size
    5. Adding in Binary
    6. Subtracting in Binary
    7. Binary Review
  1. 1Learn it
  2. 2Practice it
  3. 12343Classwork
  4. 4Homework
  5. 5Finish

Step 1 of 5: Learn it

Learn it · 1 of 5Start, read, recordNext: Worked example: a mascot's short tripChoose an activity

One idea at a time. Try the example, then keep going.

Big ideas · 1 of 5

Big ideas

Start, read, record

Do this: Read the steps. Then try following a short script on paper.

Key words

  • Key word · Unit 4ScriptA stack of connected code pieces.Exactly: A connected stack of blocks in Scratch. In our small scripts, a sprite carries out the instructions in order.See this in Key words
  • Key word · Unit 4Green flagA start signal you click.Exactly: Clicking the green flag is an event that starts scripts headed by when green flag clicked.Mix-up alert: Clicking the flag does not itself reset the sprite's position. The script needs a position-setting block for that.See this in Key words
  • Key word · Unit 4SequenceThe order of the steps.Exactly: The order in which instructions execute. Changing this order can change the result.See this in Key words
  • Key word · Unit 4TracingWalking through code one step at a time.Exactly: Writing the starting state, reading one instruction, recording the new state, and continuing in order.Mix-up alert: Record what the code does, not the result you wish it produced.See this in Key words
  • Key word · Unit 4ResetPut something back to a known start.Exactly: In our position examples, set the sprite's starting position before movement, using go to x:0 y:0.Mix-up alert: Reset when the goal needs it, such as finishing at the same position each flag run. It is not a rule for every program.See this in Key words
  1. 1

    1. Keep the order

    Key word · Unit 4SequenceThe order of the steps.Exactly: The order in which instructions execute. Changing this order can change the result.See this in Key words means the order in which instructions run. In these small scripts, read the connected blocks from top to bottom. Changing their order can change the result.

    123
  2. 2

    2. Write the starting state

    Key word · Unit 4TracingWalking through code one step at a time.Exactly: Writing the starting state, reading one instruction, recording the new state, and continuing in order.Mix-up alert: Record what the code does, not the result you wish it produced.See this in Key words means following the instructions one at a time and recording what happens. First write the starting state, such as the sprite's position before the script runs.

    01010x:0x:10
  3. 3

    3. Read one block

    x is the sprite's horizontal position. go to x:0 y:0 sets a known position. change x by 20 adds 20 to the current x. Positive changes move right; negative changes move left. We keep y at 0 in these examples.

  4. 4

    4. Record the new state

    After each block, write the new position. Use that position as the starting point for the next block. A start block triggers the script; it does not itself reset the position.

  5. 5

    5. Reset when the goal needs it

    If each green-flag run must finish at the same position, Key word · Unit 4ResetPut something back to a known start.Exactly: In our position examples, set the sprite's starting position before movement, using go to x:0 y:0.Mix-up alert: Reset when the goal needs it, such as finishing at the same position each flag run. It is not a rule for every program.See this in Key words the position first. Put go to x:0 y:0 before the change blocks. Without a reset, another run can add more movement. Not every program has the same reset requirement.

    x:0

Tip: Do not jump to the result you want. Keep a line for what each block actually does.

Worked example: a mascot's short trip

Do this: Cover the answer. Work out each new x on paper.

Omar uses the online Scratch editor on a Chromebook. His mascot starts at x:40, y:0. Its only script is when green flag clicked, go to x:0 y:0, change x by 20, then change x by -5. He traces before running: the start block leaves x at 40; go to sets x to 0; the next block makes x 20; the last makes x 15. The y position stays 0. Another complete flag run ends at x:15 again because the script resets first.

Mix-up alert: change by is not go to

Do this: Say what each block would do from x:8, y:0.

From x:8, change x by 20 gives x:28. It adds to the old x. From the same start, go to x:0 y:0 gives x:0 and y:0. It sets a position. The number in a change block is an amount to add, not a destination.

Step-through

Walk through the mascot's script

Do this: Before each next step, predict x. Then check the recorded state.

Trace Omar's one script from x:40, y:0. Each step records the position after that block. No other script moves the sprite.

Click the green flag

The when green flag clicked block starts the script. Position is still x:40, y:0. Starting is not resetting.

Step 1 of 4: Click the green flag

From other sites

Watch and explore

Do this: Pick one to see the same ideas another way.

  • Scratching the Surface: X & Y

    Scratch Team, about 1 minute

    Watch for:

    • Which direction x measures
    • Where x:0 y:0 is on the stage
    • What happens to x moving right or left
    Open on YouTube↗ (opens in a new tab)

Video not loading? It might be blocked on this wifi. Try it at home.

Step 2 of 5: Practice it

What is left (5 of 5)

Ready when you are.

Activity 1 of 5 · 0 of 5 activities done

Write it

Explain a repeatable start

Do this: Explain the starting state and block order, then compare.

Step 1 of 3: Write

Owen wants a sprite to finish at the same position on every green-flag run. The script only changes x by 20. Explain why another run can move it farther and what Owen should put before the change block.

Start here if it helps: The green flag starts the script, but...

0 words · Aim for 30 or more. This is a guide, not a limit.

Your answer is not saved anywhere. It disappears when you leave the page.

Flashcards

Sequence and tracing cards

Do this: Work out the answer before you flip. Use paper for the positions.

Card 1 of 15

Read the steps

0 Know it0 Still learning

Which step comes first?

Deck options
Keyboard help

On the card: Enter or Space flips. Left and Right move. After revealing, 1 marks Still learning and 2 marks Know it. Tab reaches every control.

Question

What is sequence?

Answer

The order in which instructions run.

Question

What are the three actions in a trace?

Answer

Write the start state, read one block, and record the new state. Continue block by block.

Question

What does x describe in these examples?

Answer

The sprite's horizontal position. Positive changes move right; negative changes move left.

Question

From x:35, y:0, what does go to x:0 y:0 do?

Answer

It sets x to 0 and y to 0.

Question

From x:12, what does change x by 20 give?

Answer

x:32, because 12 + 20 = 32.

Question

From x:18, what does change x by -6 give?

Answer

x:12. A change of -6 moves left by 6.

Question

Which ends at x:10: go to x:0 y:0 then change x by 10, or those blocks in reverse?

Answer

Go to first, then change by. Reversing them ends at x:0.

Question

Your script must finish at the same position on each flag run. What should come before its change blocks?

Answer

A position reset, such as go to x:0 y:0.

Question

Does clicking the green flag reset x by itself?

Answer

No. The script needs a block that sets the position if a reset is required.

Question

Before following any movement blocks, what position should you record?

Answer

The starting state: the sprite's position before the script runs.

Question

After tracing one block, which position do you use for the next block?

Answer

The new position you just recorded.

Question

Omar's mascot starts at x:40, y:0. What is its position just after the start block, before go to?

Answer

Still x:40, y:0. The start signal does not reset the position.

Question

From x:8, does change x by 20 give the same result as go to x:0 y:0?

Answer

No. The change gives x:28. The go to block sets x:0, y:0.

Question

In Omar's worked example, does y change during the trace?

Answer

No. The y position stays 0.

Question

Why does another complete run of Omar's script finish at x:15 again?

Answer

The script resets to a known position before the change blocks.

True or false

Trace, do not guess

Do this: Choose True or False. Check each explanation.

Statement 1 of 12

change x by 20 always ends at x:20.

Self-test

Check yourself

Do this: Answer each question and read the explanation before moving on.

8 questions. One at a time.

Practice, not a grade. No timer. Your best score stays in this browser.

Match

Match the key words

Do this: Choose a word, then choose its meaning.

Word match round

Connect the ideas

0 / 4 connected

Choose a term, then its meaning. Or drag its grip. Use Tab and Enter or Space; Escape clears.

Terms

Meanings

Step 3 of 5: Classwork

Working on paper? Open this lesson's Classwork step and choose Paper and PDF. It gives you your own empty sheet to print.

Your work trail

  1. 1Question 1Start hereCheck your answer. Hints help you try again.
  2. 2Question 2Locked
  3. 3Question 3Locked
  4. 4Question 4Locked
  5. Your exit sentenceLockedOne thing you can do, or a question you still have.
  6. Turn in on ClassroomLockedDownload your finished work, then attach it.
Before you startQuestion 1. Show all steps
  1. 1Question 1Start hereCheck your answer. Hints help you try again.
  2. 2Question 2Locked
  3. 3Question 3Locked
  4. 4Question 4Locked
  5. Your exit sentenceLockedOne thing you can do, or a question you still have.
  6. Turn in on ClassroomLockedDownload your finished work, then attach it.

One step at a time. A hint can help you try again.

Classwork

Sequence and Tracing

Your next step

Started on another device?

Shared computer

How saving works

  • Your answers save in this browser on this device as you go.
  • Your sentence and your name are never saved in this browser. They stay only on this page until you close it, and in a PDF you download.
  • Your teacher sees nothing until you turn it in on Google Classroom. This site can't see Classroom.
  • Anyone using this browser can see saved answers. On a shared computer, use Forget when you finish.
  • Finished work stays until the end of the school year. Unfinished work stays for 30 days.

Step 4 of 5: Homework

Homework · 10 points

Sequence and Tracing homework

Opening your homework…

Working on paper? Open this lesson's Homework step and choose Paper and PDF. It gives you your own empty sheet to print.

Step 5 of 5: Finish

Ready to move on?

Practice it: You did 0 of 5 activities.

You decide when you have finished. This is your study progress, not a grade.

Before you move on

Your classwork and homework

Your teacher gets your work only when you turn it in on Classroom.

  • Classwork: not started yet.Start classwork
  • Homework: not started yet.Start homework

Not marked finished yet.

Next lesson: Plan, Build, ExplainUnit 4: Algorithms and Programming with Scratch
TOPICDONE
Published with approval from Mr. Farzin Khan Shifat. Last updated November 4, 2026.
For teachers: post this lesson in Classroom

Two ready posts. Nothing is saved or sent. Make one Classroom assignment for each step you assign, using the points shown below and its own due date. Copy its post and paste it into the assignment's instructions.

  • 1234Classwork

    Worth 10 points.

    https://gradebridge-beryl.vercel.app/learn/csc/programming-with-scratch/sequence-and-tracing#classwork

  • Homework

    Worth 10 points.

    https://gradebridge-beryl.vercel.app/learn/csc/programming-with-scratch/sequence-and-tracing#homework

After students turn it in →, open Check student work

Download their files from the assignment's Drive folder, then open them in Check student work.