You are on page 1of 2

1.

Explain the difference between EACH of the following pairs of terms


a. Looping and conditional structure

b. Testing and debugging

c. Variable and constant

d. The symbols = and <>

e. Pseudocode and flowcharts

f. Output and Input

g. Complier and Assembler

2. You are using a program to calculate the average number of storms that have recently

passed through the Caribbean. This is calculated by adding the number of storms and then

dividing by the number of years. The screen for the program looks like one below:

STORM STATS

Enter the number of years

Enter the Number of Storms:

Year1 Year2 Year3 Year4

Average numbers of storms:


i. You were told that the number of storms for the last three years were 10, 8, and 12

a) The number of years


b) Year1
c) Year2
d) Year3
e) Year4
5 marks

ii. State the results for Average number of storms 1 marks

iii. Write an algorithm using pseudocode to input the total number of storms for three
years, to calculate the average number of storms, and to output result. 4 marks

3. Write an algorithm to interchange the values in two variables A

&B [3 marks]

You might also like