Skip to content
Truth Academy.
Truth Academy
← All modules
How Computing WorksFoundational45 min

Programming: Your First Instructions

How you tell a computer, which understands nothing, exactly what to do, step by literal step.

AI tutor is turned off for this class

Use the CS106A lectures, notes, and assignments below to keep learning.

Big Idea

How Computing Works

Grade bands

K-2 · 3-5 · 6-8 · 9-12

View on the ladder →

Lesson overview

How you tell a computer, which understands nothing, exactly what to do, step by literal step.

Teacher script · 45 min

  1. 0–5

    Hook

    A computer is not clever. It follows instructions literally, in order, with zero common sense. If you tell it to put on your shoes before your socks, it will. Programming is the skill of giving instructions so precise that a thing with no judgment still gets it right.

  2. 5–15

    Explore

    Students do the activity in pairs: On paper, keep a box called 'total' starting at 0. Go through a list of prices and each time add the price to the box.

  3. 15–30

    Explain

    A CONDITIONAL lets a program choose: IF the answer is right, say 'yes,' OTHERWISE say 'try again.' A FUNCTION is a named recipe of steps you can reuse by name instead of rewriting it. Most programs are these four pieces (variables, loops, conditionals, functions) combined. DECOMPOSITION is the skill: splitting a big task into small pieces each of those can handle.

  4. 30–40

    Connect to the summit

    Read aloud the "From the summit" section below. Ask students which ideas from today they recognize in it.

  5. 40–45

    Check

    Run the formative check below. Anyone who can explain a key term in their own words has it.

Student activity

On paper, keep a box called 'total' starting at 0. Go through a list of prices and each time add the price to the box.

Slides

1Title: Programming: Your First Instructions
2Hook: A computer only does exactly what you say
3Do it: Store a thing, then repeat a thing
4How it works: Decisions, and naming your recipes
5Key idea: Variable
6Key idea: Loop
7Key idea: Conditional
8From the summit: the Stanford course

Formative check

  • 1.In your own words, what is "Variable"? (Looking for: A named box that holds a value you can read or change later.)
  • 2.In your own words, what is "Loop"? (Looking for: Telling the computer to repeat steps without rewriting them each time.)
  • 3.In your own words, what is "Conditional"? (Looking for: A fork in the road: do one thing IF something is true, else do another.)

Carry-away concepts

Variable
A named box that holds a value you can read or change later.
Loop
Telling the computer to repeat steps without rewriting them each time.
Conditional
A fork in the road: do one thing IF something is true, else do another.
Function
A named recipe of steps you can reuse by calling its name.
Decomposition
Breaking a big task into small steps a computer can each handle.

From the summit · the Stanford source

A first programming course: you write working programs from scratch (variables, loops, conditionals, functions) and learn to break any task into steps a machine can follow without guessing what you meant.

This module is based on a Stanford course.