Computational Thinking & AI

Exact steps, loops, if-then, debugging and how AI learns.

Skills

  • Clear, exact steps
  • Patterns and rules
  • Loops
  • If this, then that
  • Debugging
  • Sorting data
  • How AI learns from examples
  • Keeping personal information private

Lessons

Clear, exact steps

Computers need clear, exact steps. A step like "go a bit" is not clear; "walk 5 steps forward" is. Examples: Unclear: "Make tea"; Clear: "Boil 1 cup of water"; Clear: "Turn right, walk 3 steps". Tip: Test your steps by asking a friend to follow them exactly.

Patterns and rules

Patterns follow rules. Find the rule and you can predict the next item. Examples: 2, 4, 6, 8: add 2, next is 10; 🔺🔵🔺🔵: next is 🔺; Mon, Wed, Fri: every second day. Tip: Write the rule in words.

Loops

A loop repeats steps. "Repeat 4 times: move forward, turn right" draws a square. Examples: Repeat 3 times: clap; Repeat 4 times: forward, turn: square; A loop saves writing the same step again. Tip: Look for repeated steps and replace them with a loop.

If this, then that

If-then rules make choices. If something is true, do one thing; else do another. Examples: If it rains, then take an umbrella; If the light is red, then stop; If the answer is right, then score 1 point. Tip: Write three if-then rules for your day.

Debugging

A bug is a mistake in the steps. Debugging means finding and fixing it. Check one step at a time. Examples: The robot hit a wall: one turn was wrong; The square had 3 sides: the loop ran 3 times, not 4; Fix it and test again. Tip: Test after each small change.

Sorting data

Sorting data puts information in order so it is easy to use: by size, by name or by number. Examples: Sort names A to Z; Sort heights from shortest to tallest; Sort marks from highest to lowest. Tip: Decide what you are sorting by before you start.

How AI learns from examples

AI learns from many examples. Show it many cat pictures and it learns what a cat looks like. With poor examples, it can make mistakes. Examples: A phone learns to recognise faces; A music app learns songs you like; Wrong examples teach AI wrong things. Tip: Always check what AI tells you.

Keeping personal information private

Personal information is private. Keep it safe online. Examples: Do not share your full name, address, school or phone number; Do not share photos without asking an adult; Tell an adult if someone asks for personal details. Tip: When unsure, do not share. Ask an adult.

For parents