9 1 Programming Basics 1
9 1 Programming Basics 1
1 Programming basics
Unit 9 Computing Concepts
Icons: Flash activity (these are not editable) Useful web links in the Notes Page
My speed
is set to 5.
My speed is
set to 11.
a = 1+1
the name of the number that
the variable will be stored in ‘a’
8 of 19 © Boardworks Ltd 2013
Variables in games
score=0
If you gain 10 points for every target you hit, the variable will
change by 10.
This is pseudocode,
a way of planning out our
score=score+10 code before converting it
to the chosen
programming language.
b=4*3
What number has been assigned to ‘b’?
b=12
IF answer=10 THEN
response=“Correct!”
ELSE
response=“Incorrect!”
ENDIF
10 Correct!
IF a<10 THEN
sound alarm
ELSE
flash the lights
ENDIF