Computing

Variables, if-then-else, flowcharts, games, databases and my digital footprint.

Skills

  • Variables (keeping score)
  • If, then, else
  • Flowcharts
  • Designing a simple game
  • Databases and searching
  • Vector drawing
  • My digital footprint
  • Screen time and wellbeing

Lessons

Variables (keeping score)

A variable is a named store for information that can change while a program runs. A score in a game is a variable. Examples: Set score to 0 at the start; Change score by 1 when you catch a star; Lives, time and level can be variables too. Tip: Give variables clear names, like "score", not "x".

If, then, else

Selection lets a program make choices. If a condition is true, then do one thing; else (if false) do something different. Examples: If touching the ball, then add 1 to score; If score = 10, then say "You win!"; If key pressed, then jump, else stay still. Tip: Say your rules aloud as if… then… else… sentences before coding.

Flowcharts

A flowchart shows an algorithm as a diagram. Ovals are start and end, rectangles are actions and diamonds are decisions with yes and no arrows. Examples: Start → Is it raining? → Yes: take an umbrella; No: wear sunglasses → End; Flowcharts help plan programs before coding. Tip: Draw a flowchart for making a cup of squash.

Designing a simple game

To design a game, decide on the goal, the characters, the controls and how you win or lose. Then build it bit by bit, testing as you go. Examples: Goal: catch falling apples; Controls: arrow keys move the basket; Win at 20 points; lose if 3 apples hit the ground. Tip: Ask a friend to test your game and give feedback.

Databases and searching

A database stores information in an organised way. Each record is one item, and each field is one piece of information about it. Computers can search and sort databases quickly. Examples: Record: one animal. Fields: name, legs, habitat; Search: animals with 4 legs that live in water; Sort: animals by weight. Tip: Make a database of your class's favourite books.

Vector drawing

Vector drawings are made of shapes and lines described by maths. You can move, resize and layer each shape, and it stays sharp when you zoom in. Examples: Combine circles and rectangles to draw a robot; Bring shapes to the front or send them back; Copy and paste to repeat parts. Tip: Zoom right in: vector shapes never go blurry.

My digital footprint

Everything we do online leaves a trail, called a digital footprint. Posts, photos and comments can stay online for a long time, even if we delete them. Examples: A comment on a video; A photo shared by a friend; Searches and games you play. Tip: Before posting, ask: would I be happy for my teacher or gran to see this?

Screen time and wellbeing

Screens can be fun and useful, but too much can affect sleep, mood and exercise. A healthy balance includes time outdoors, with family and friends, and good sleep. Examples: No screens for an hour before bed; Take breaks every 30 minutes or so; Notice how you feel after scrolling. Tip: Plan one screen-free activity every day.

For parents