Coding 2 Questions
Coding 2 Questions
9
1 Algorithms can be shown as structured English, f lowcharts and
questions pseudocode.
Explain what is meant by
a) structured English [2]
b) a f lowchart [2]
c) pseudocode. [2]
2 Several techniques are used in computational thinking.
9 Algorithm design and problem solving
236
9
been added to help you.
01 REPEAT
02 OUTPUT "Menu Temperature Conversion"
03 OUTPUT "Celsius to Fahrenheit 1"
04 OUTPUT "Fahrenheit to Celsius 2"
9.2
05 OUTPUT "Exit 3"
Algorithms
06 OUTPUT "Enter choice"
07 IF Choice = 1 OR Choice = 2
08 THEN
09 OUTPUT "Enter temperature"
10 INPUT Temperature
11 IF Choice = 1
12 THEN
13 ConvertedTemperature ← 1.8*Temperature + 32
14 ELSE
15 ConvertedTemperature ← (Temperature – 32) * 5 / 9
16 ENDIF
17 OUTPUT "Converted temperature is ", ConvertedTemperature
18 ELSE
19 IF Choice <> 3
20 THEN
21 OUTPUT "Error in choice"
22 ENDIF
23 ENDIF
24 UNTIL Choice = 3
237