Home›Lesson Plans›Computer Science›Computer Science · Grade 5

Conditionals: If-Then

Fifth graders learn conditionals — “if-then” instructions that let programs make decisions — doing one thing when a condition is true, so code can react to what’s happening.

Grade 5Programming40 minutes1 class periodUse → Modify → CreateExplicit teaching4 StandardsCSTA
Start the Lesson
Lesson at a Glance

Everything you need before the bell rings

Learning Objectives

Students will be able to…

  • ✓Define a conditional.
  • ✓Explain if-then.
  • ✓Match conditions to actions.
  • ✓Use a conditional.
Essential Question

How does a game know to end when you win, or a character know to stop at a wall? Code can make decisions! How do “if-then” conditionals let programs choose what to do?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Match It · Interactive

Match the If-Then

Project this and match each “IF” condition to the “THEN” action — tap an IF, then tap what happens.

🔀 Match each IF to its THENTry it
IF (condition)
THEN (action)
Now tap the THEN action!
The Lesson · Use → Modify → Create (a coding progression with Unplugged practice)

40 minutes, five moves

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

1

Hook — Code That Decides

5 min

How does a game know to end when you win? Code can make decisions!

👩‍🏫 Teacher Moves

  • Pose the decision puzzle.
  • Introduce if-then.
  • Set the goal.

🎒 Student Actions

  • Consider it.
  • Meet if-then.
  • Predict the idea.
2

Unplugged — Unplug It

10 min

Students practice.

👩‍🏫 Teacher Moves

  • Play “If I say X, then you do Y.”
  • Act out conditions.
  • Feel the decision.

🎒 Student Actions

  • Play it.
  • Act it.
  • Feel it.
3

Use — Match If-Then

10 min

Students use the tool.

👩‍🏫 Teacher Moves

  • Send students to Match the If-Then.
  • Match each pair.
  • Note the decisions.

🎒 Student Actions

  • Match them.
  • Note decisions.
  • Explain them.
4

Modify — Change It

10 min

Students modify.

👩‍🏫 Teacher Moves

  • Change a condition.
  • Predict the new action.
  • Explain the change.

🎒 Student Actions

  • Change it.
  • Predict it.
  • Explain it.
5

Create — Create

5 min

Students conclude.

👩‍🏫 Teacher Moves

  • Write an if-then rule.
  • Explain the decision.
  • Complete the exit ticket.

🎒 Student Actions

  • Write one.
  • Explain 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
1B-AP-10

Create programs that use conditionals to express ideas.

CSTA
1B-AP-09

Create programs using events and control structures.

CSTA
1B-AP-11

Decompose problems into parts.

ISTE
5

Computational Thinker.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • If-then sentence cards.
  • Sentence frame: “If ___, then ___.”
  • Act out conditions.

Support & Access

IEP / 504
  • Start with one clear if-then.
  • Match one pair at a time.
  • Use pictures.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Add an “else” option.
  • Code a conditional in a game.
  • Combine conditions.
Materials

What to gather

  • 📽️Projector / board
  • 🔀If-then cards
  • 💻Match the If-Then
  • 📋Condition strips
  • ✏️Pencils
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

conditionalan if-then instructionconditionsomething that may be true or falseifthe start of a conditionthenthe action that followsdecisiona choice the code makestruewhen a condition is metfalsewhen a condition is not meteventsomething that happens
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
What is a conditional?
An “if-then” instruction that lets a program make a decision.
QUESTION 2
Finish the conditional: “IF the light is green, THEN ___.”
“…go” (or drive/walk).
QUESTION 3
Why are conditionals useful in code?
They let programs react and make choices based on what is happening.

Create: a game rule.

Have students write an “if-then” rule for a game they invent — like “if you touch a star, then you score a point.” A printable conditionals sheet 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.

🃏 Conditionals (If-Then)Flip
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.

📝 Conditionals (If-Then)Quiz
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.

🖨️ Conditionals (If-Then)Print
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: condition, conditional, decision, event, false, if, then, true
  1. something that happens
  2. the start of a condition
  3. when a condition is met
  4. a choice the code makes
  5. an if-then instruction
  6. something that may be true or false
  7. when a condition is not met
  8. the action that follows

Part B · Show what you learned

  1. What is a conditional?
  2. Finish the conditional: “IF the light is green, THEN ___.”
  3. Why are conditionals useful in code?
Answer key — Part A: 1) event · 2) if · 3) true · 4) decision · 5) conditional · 6) condition · 7) false · 8) then
Part B: 1) An “if-then” instruction that lets a program make a decision. 2) “…go” (or drive/walk). 3) They let programs react and make choices based on what is happening.