Question 5
Edexcel Computer Science June 2019 Paper 2GCSE6 marks
On the specification
- (a)
- 1.2 Algorithms
- (b)
- 6.1 Develop code
Question text
5 Errors are revealed when program code is translated and executed. (a) Here is an error that a programmer received when writing and testing some code. Explain this type of error. (2) (b) Margaret is having a new decorative banner fitted around her kiosk. The kiosk is a rectangle 5 metres long and 3 metres wide. The door and serving window take up one of the shorter sides, so it does not need the banner. The pseudocode for an algorithm that determines the length of banner needed is shown. Line 6 and line 8 have logic errors. Identify the error in each line and construct new lines of code that will correct the errors. (4) Error Correction Line 6 Line 8 (Total for Question 5 = 6 marks)