Professional Documents
Culture Documents
Computer Science Online Test Notes
Computer Science Online Test Notes
MOD: modulus, the remainder left over when a number is divided by another.
DIV: integer division is used to find the quotient after division
Variables are a key element of programming. They are used for calculations, for
storing values for later use, in decisions and in iteration.
Diamond is used for any decisions for example if statement and loops
If is a SELECTION statement
For is ITERETION
iterations are useful since iteration allows algorithms to be simplified by stating that
certain steps will repeat until told otherwise. This makes designing algorithms
quicker and simpler because they don’t need to include lots of unnecessary steps.
id<- USERINPUT
ELSE store ID
END WHILE
1. Total 0
2. FOR i 1 to 7
3. maxTEMPERATURE USERINPUT
4. total total + maxTemperature
5. If i =7 THEN
6. averageWeeksTemp total/ 7 ELSE OUTPUT “add next day’s temperature”