From Paper 1: Principles of computer science
6(a)4 marks
Explain the purpose of each type of test: normal, boundary, erroneous and integration.
def average(values): total = 0 for i in range(1, len(values)): total = total + values[i] return total / len(values) scores = [12, 15, 9, 20]print("Average is " + average(scores))Identify and correct three errors.readings = [18.5, 19.2, 21.0, -999, 22.4, 23.1, 20.7, -999, 19.8, 18.9]# -999 means the sensor failed to record a valueThis paper is written by Plasmo in the style of the Edexcel A-Level Computer Science exam. It is not a past paper and is not produced or endorsed by the exam board.