Constructs
Constructs
Test a value named Total, if it’s less than or equal to 10, add 1 to Total,
otherwise reset the value to 0.
Test a value named Color. If Value is Red, print STOP, if value is Yellow,
print SLOW, if value is Green, print GO!
IF Color is Red
Print STOP
ELSE IF Color is Yellow
Print SLOW
ELSE IF Color is Green
Print GO
Read in 20 number values. If the value is even, print the value otherwise
skip it.
Read in a list of number values (the list can be different sizes at different
times). Add the sum of the values in a variable called Total.
Initialize Total as 0
FOR each number in the list
Add the number to Total