Gce Model Questions Vol1 2022 Computer Studies Question 8
Practice essay / theory question 8 from the 2022 Gce Model Questions Vol1 Computer Studies examination. This question covers Basic Programming, Python Syntax, Control Structures, Functions, File Handling .
A secondary school wishes to develop a simple student grading system using Python. The system should read a text file called **scores.txt** that contains one line per student in the format:
,,
where is an integer between 0 and 100. The program must:
1. Store each record in an appropriate data structure.
2. Compute the grade based on the following scale:
- 70‑100 : A
- 60‑69 : B
- 50‑59 : C
- 45‑49 : D
- 0‑44 : F
3. Produce a summary report that lists each student’s ID, name, score, grade and the class average score.
4. Handle possible errors such as missing fields, non‑numeric scores or scores outside the 0‑100 range by skipping the faulty line and recording the line number in a separate log file **errors.log**.
Write the required Python code and answer the following questions.
Question Parts
Detailed Solution & Marking Scheme
Get the step-by-step solution, key points required by examiners and detailed marking guidance through the Edcrib AI Tutor.
Reveal AnswerAbout This Question
This is Gce Model Questions Vol1 2022 Computer Studies Question 8. It is one of the essay questions from the 2022 Gce Model Questions Vol1 Computer Studies examination.
The question covers Basic Programming, Python Syntax, Control Structures, Functions, File Handling .
Master the Exam!
You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.