Mac Cse: Information Technology Algorithm Worksheet
Mac Cse: Information Technology Algorithm Worksheet
Information Technology
Algorithm Worksheet
1. This following flowchart inputs two numbers, carries out a calculation and then outputs the results.
Complete the following table for the three sets of input data.
C neg pos
1 0 0
No
Yes
(b) What is the output of the algorithm.
3. Read the algorithm.
a) Complete the trace table using the data: 9.0, 7.8, 1.2, 4.5, 10.0, 6.4, 3.1.
C high total
1 0 0
Number X T
Start
Set A to 3
Set B to 5
Set SUM to 1
While A <= 50 do
A=A+B
B=B+A
SUM = SUM + B
Endwhlie
Print SUM
Stop
For each of the first two lines of code, write a comment to indicate what the code does.
(2 marks)
10. (a) Draw a flowchart which takes temperatures input over a 7 day period
(once per day) and outputs the number of days when the temperature was below 20°C and the number of
days when the temperature was 20°C and above.
11. Draw a flowchart to accept five numbers one each time, calculate and output the sum of the numbers.
12. Write an algorithm to read any ten numbers, calculate their sum and print it as well as the highest number in the list.