Home›Lesson Plans›Computer Science›Programming · Grade 7

How a Program Runs

Seventh graders discover that the code they write is not what the computer runs directly, and trace how a program goes from typed text to translated instructions to a result on screen, then put the steps in order.

Grade 7How a Program Runs50 minutes1 class periodUse → Modify → CreateExplicit teaching4 StandardsCSTA
Start the Lesson
Assign or share this lesson

Copy link works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment.

Lesson at a Glance

Everything you need before the bell rings

Learning Objectives

Students will be able to…

  • ✓See how code becomes a program.
  • ✓Know code must be translated.
  • ✓Follow the run.
  • ✓Order the steps.
Essential Question

You type code in words people can read, but a computer only understands simple on-off instructions. What has to happen between pressing run and seeing a result?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Order the Steps · Interactive

Order the Steps

Project this and put the steps of running a program in order — tap each one from writing the code to showing the output.

🖥️ Put the steps of running a program in orderTry it
Tap the steps a program takes to run in order, starting when you write the code.
The Lesson · Use → Modify → Create (a coding progression with Unplugged practice)

50 minutes, five moves

Tap any phase to open the teacher moves and student actions.

1

Hook — From Typing to Running

5 min

You type code in words a person can read, but a computer only understands simple on-off instructions. So what has to happen between pressing run and seeing a result?

👩‍🏫 Teacher Moves

  • Show a line of code and its output.
  • Ask what happens between.
  • Set the goal.

🎒 Student Actions

  • Think.
  • Share.
  • Get ready.
2

Use — Order the Steps

12 min

Students put the steps of running a program in order.

👩‍🏫 Teacher Moves

  • Send students to Order the Steps.
  • Order the steps.
  • Name each one.

🎒 Student Actions

  • Order.
  • Say.
  • Note it.
3

Modify — Who Does What

13 min

Students name what handles each step.

👩‍🏫 Teacher Moves

  • Pick a step.
  • Say who or what does it.
  • Say what it produces.

🎒 Student Actions

  • Pick.
  • Say.
  • Say.
4

Create — My Run Map

15 min

Students diagram the journey.

👩‍🏫 Teacher Moves

  • Draw code, translator, and output.
  • Add arrows for each step.
  • Label where translation happens.

🎒 Student Actions

  • Draw.
  • Add.
  • Label.
5

Reflect — Code to Result

5 min

Students reflect on running a program.

👩‍🏫 Teacher Moves

  • Why must code be translated before it runs?
  • What is the last step a program does?
  • Complete the exit ticket.

🎒 Student Actions

  • Say it.
  • Say it.
  • Complete the exit ticket.
Standards Alignment

Built to the standards you report on

Aligned to the CSTA K-12 Computer Science Standards and ISTE Standards for Students.

CSTA
2-AP-13

Decompose problems and describe how a program is created and run.

CSTA
2-AP-17

Systematically test and refine programs.

CSTA
2-CS-03

Explain how programs run on computing systems.

ISTE
1.5.c

Computational Thinker: model how a system turns input into output.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Step picture cards.
  • Sentence frame: “First ___ , then ___ .”
  • Order two steps at a time.

Support & Access

IEP / 504
  • Start with writing and saving.
  • Match each step to a tool.
  • Add one step at a time.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Compare a compiler and an interpreter.
  • Trace a real one-line program.
  • Explain where a bug could stop the run.
Materials

What to gather

  • 📽️Projector / board
  • 🖼️Program-step cards
  • 💻Order the Steps
  • 📜A sample code snippet
  • ✏️Pencils
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

programa set of instructions written for a computercodethe instructions a programmer writes in a languageprogramming languagethe words and rules used to write codetranslateto turn code into instructions the computer understandscompilera tool that translates all the code at once before runninginterpretera tool that translates and runs code line by linerunto carry out the instructions of a programoutputthe result a program produces
Evaluate

Exit Ticket

Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.

QUESTION 1
Why must code be translated before it runs?
You write code in a language people can read, but the computer only understands simple instructions, so the code has to be translated first.
QUESTION 2
What is the last step when a program runs?
It shows the output or result, such as text on the screen or an action.
QUESTION 3
What is the difference between a compiler and an interpreter?
A compiler translates all the code at once before running; an interpreter translates and runs it line by line.

Create: my run map.

Have students draw the code, the translator, and the output, add arrows for each step, and label where translation happens, so the hidden process becomes visible. A printable how-a-program-runs worksheet is in the Computer Science library.

Study · Flashcards

Study the key terms

Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.

🃏 How a Program RunsFlip
Card 1
Term
Tap to flip →
Meaning
0

Nice work!

Practice · Quiz

Check your understanding

A quick self-check with instant feedback, drawn from this lesson’s key terms.

📝 How a Program RunsQuiz
Score: 0
1 / 6
Question 1
0%

Nice work!

Practice · Worksheet

Printable worksheet

A print-and-go review sheet with a built-in answer key. Tap “Show answer key” to reveal answers, or print the clean version for students.

🖨️ How a Program RunsPrint
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: code, compiler, interpreter, output, program, programming language, run, translate
  1. to turn code into instructions the computer understands
  2. a tool that translates all the code at once before running
  3. to carry out the instructions of a program
  4. the result a program produces
  5. the words and rules used to write code
  6. a tool that translates and runs code line by line
  7. a set of instructions written for a computer
  8. the instructions a programmer writes in a language

Part B · Show what you learned

  1. Why must code be translated before it runs?
  2. What is the last step when a program runs?
  3. What is the difference between a compiler and an interpreter?
Answer key — Part A: 1) translate · 2) compiler · 3) run · 4) output · 5) programming language · 6) interpreter · 7) program · 8) code
Part B: 1) You write code in a language people can read, but the computer only understands simple instructions, so the code has to be translated first. 2) It shows the output or result, such as text on the screen or an action. 3) A compiler translates all the code at once before running; an interpreter translates and runs it line by line.