Chapter 8

Programming

Variables, loops, conditions and data types in programming — with an interactive exercise.

Programming turns an algorithm into code a computer can run.

A variable stores a value that can change. A loop repeats instructions; a condition (IF) chooses what to do. Common data types include integer (whole number), real (decimal), string (text) and Boolean (true/false).

Remember

  • Variables store data; loops repeat; IF selects.
  • Data types: integer, real, string, Boolean.

Stuck on this topic? A verified JomKelas tutor can walk you through it.

Find a verified tutor