Lesson · Grade 6 · Applied Design, Skills and Technologies

Algorithms: Steps in Order, Choices and Loops

  • Grade 6
  • Applied Design, Skills and Technologies
  • 1 min 19 s
  • British Columbia
  • BC6-AD-01

An algorithm for watering three plants is built as a stack of blocks: a step, a loop that repeats three times with an "if the soil is dry" choice inside it, then a final step, labelled sequence, selection and repetition. A pointer then follows the algorithm block by block while a watering can waters the two dry plants and skips the wet one, ending on the recap that algorithms are built from steps in order, choices and loops.

Anyone can watch two lessons on the website without an account. Signing in is free, no payment and no card, and opens three a day; Plus has no limit.

Loading

In one sentence

The question this lesson answers

How could we write steps for watering three plants?

A list of clear steps for doing a task is called an algorithm.

Transcript

What the lesson says

How could we write steps for watering three plants?

A list of clear steps for doing a task is called an algorithm.

Algorithms are built from three building blocks: sequence, selection and repetition.

Sequence means doing the steps in order, one after another.

Order matters: you must fill the can before you can water a plant.

Selection makes a choice: if the soil is dry, water the plant.

If the soil is not dry, we skip that step.

Repetition, or a loop, repeats the same steps.

This loop runs three times, once for each plant.

Let's follow it: first, we fill the can.

Plant 1 has dry soil, so we water it.

Plant 2 has wet soil, so we skip watering it.

Plant 3 has dry soil, so we water it too.

After three times the loop ends, and we put the can away.

Algorithms are built from steps in order, choices and loops.

Curriculum

Where this fits

British Columbia, Grade 6

Applied Design, Skills and Technologies, Computational thinking: simple algorithms that reflect computational thinkingBC6-AD-01

Next: Secret codes: the Caesar shift cipher

British Columbia, Grade 7

Applied Design, Skills and Technologies, Computational thinking: simple algorithms that reflect computational thinkingBC7-AD-01

Next: Secret codes: the Caesar shift cipher

This lesson is also listed in Grade 7.

The outcomes and strands follow the British Columbia curriculum.