1 of 18

Calculations

on the data

Make a decision

2 of 18

3 of 18

variables

a variable is a name for a container1 that stores a value

1really a location in the computer memory

4 of 18

variables

5 of 18

data structures

6 of 18

binary

All data in a computer is stored as a binary number. Depending on context, the binary value 11100101 can be interpreted by the computer as

  • the positive integer 229
  • the negative integer -27
  • the character σ (sigma)

  • the red level of a pixel (229 out of 255)

  • an instruction to the processor (e.g. add two numbers)
  • ⋮ ⋮ ⋮

7 of 18

Calculations

on the data

8 of 18

calculations

9 of 18

Make a decision

10 of 18

11 of 18

12 of 18

Step-by-Step (top-to-bottom)

algorithm

13 of 18

14 of 18

if with else ifs

15 of 18

looping

(definite loop)

How many temperatures are calculated

16 of 18

looping

(indefinite loop)

17 of 18

bubble sort algorithm

18 of 18

number guessing algorithm