Skip to content
PlayOwl

Coding worksheet · Coding

If-then blocks: what does Olly say? · Grades 3–4

Read 5 short block code programs about if-then-else choices and work out by hand what each one prints or the final value of a variable. Builds careful code tracing.

  • Grades 3–4 · ages 8 to 10
  • Easy
  • 10 to 15 minutes
  • 1 page
  • Free
Paper

The answer key is a separate page for grown-ups. Sign in to download it.

Make another one like this

Directions: Read each program from top to bottom, one block at a time. Keep track of every box (variable) as it changes, then write the answer.

  • 1 How many coins at the end?
  • set coins to 6 if coins = 6 then change coins by 5 else change coins by 2
  • coins =
  • 2 What does Olly say?
  • set count to 0 for each n in [7, 3, 6, 1] if n > 7 then change count by 1 say count
  • 3 What does Olly say?
  • set kites to 6 change kites by 3 if kites < 3 then say "warm"
  • else say "cold"
  • 4 What is big at the end?
  • set a to 13 set b to 9 if a > b then set big to a else set big to b set big to big * 2
  • big =

What your child practices

Your child builds careful code tracing. The skill is “Conditions”: use if/else to respond to situations.

Grades and ages
Grades 3–4, ages 8 to 10
Time
About 10 to 15 minutes
Subject
Coding
Level
Easy for Grades 3–4
Answer key
Yes, for grown-ups who sign in
Printing
1 page, US Letter or A4, low-ink option
Updated

How to use it

Work through the first program together, one line or arrow at a time. Then let your child work through the rest, showing their thinking on the page. It is one of the easier sheets for Grades 3–4, good as a warm-up or a first look at the skill.

An answer key comes with it as a separate page that grown-ups download after signing in.

Tip for grown-ups: Have your child write each variable's value beside its line as they trace.

Done on paper? A grown-up can record it on the child's page in PlayOwl; downloading alone doesn't count as finished.

Printable generator

Make your own printables

Make brand-new sheets like this one, with answer keys, using the printable generator that comes with a PlayOwl plan. This sheet stays free.