We are working with Cambridge Assessment International Education towards endorsement of this title. Any references or material related to answers, grades, papers or examinations are based on the opinion of the author(s). CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: PROGRAMMING BOOK
CONTINUED The flowchart includes three errors as well as elements that could be better defined. Before you read on to the next part, which shows the errors and improvements, see if you can: spot the errors and explain how to correct them
2
suggest the possible improvements.
Errors and possible improvements
LE
1
While the flowchart may at first glance appear logical it does contain several errors and ambiguities. Table 2.6 identifies and explains the errors in the flowchart and Table 2.7 offers some improvements.
This is a process symbol and can have only one outward flow. This symbol should be replaced with one or more decision symbols.
Check in Range 10 to 20
OUTPUT "Not in range re-enter"
INPUT Numbers
The task stated ‘Once both numbers are within the range’, so this does not achieve the task requirements .
M
Calculate Result
This attempt at a loop will cause the user to enter new numbers. However, it will only check the numbers once. If the user inputs incorrect numbers a second time, the numbers will not be checked.
P
Check in Range 10 to 20
Not only is the wrong symbol used, there are no TRUE or FALSE options to indicate the direction of flow.
This is the correct symbol but does not show what is being output.
OUTPUT
It should show OUTPUT Result.
Table 2.6: Errors in the flowchart
A
This does not indicate how many numbers should be input.
INPUT Numbers
S
Calculate Result
Check in Range 10 to 20
It would be improved by indicating the two numbers as individual inputs. Either by using two input symbols or by writing two INPUT descriptions in one input symbol. Although this process is accurately described, it is not well defined. It does not show what calculation should take place.
When replacing this incorrect symbol with decision symbols, the level of detail should be considered. Currently there is ambiguity in the words used. It does not define whether the check should include the values 10 and 20 or whether they should be excluded from the range. This can be made clearer through using the mathematical > and < symbols.
Table 2.7: Improvements
32 Original material © Cambridge University Press 2021. This material is not final and is subject to further changes prior to publication.