Question 4
Edexcel Computer Science Specimen Paper 2GCSE15 marks
On the specification
- 6.1 Develop code6.2 Program constructs
Question text
4 A program takes a year group as input and outputs the stage of education the year group belongs to. The program loops continually until the user inputs 0 to stop the program. Input Output 0 Exits program 1, 2, 3, 4, 5, 6 Primary 7, 8, 9, 10, 11 Secondary 12, 13 College The lines of code in the program are mixed up. Open file Q04. Amend the code to make the program work and produce the correct output. You will need to rearrange the lines. Use comments, white space, indentation and layout to make the program easier to read and understand. Do not change the functionality of the given lines of code. Do not add any additional functionality. Save your amended code file as Q04FINISHED.py (Total for Question 4 = 15 marks)