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 .

Gce Model Questions Vol1 2022 Computer Studies Essay / Theory
Topics: Basic Programming Python Syntax Control Structures Functions File Handling
Question 8 GCE_MODEL_QUESTIONS_VOL1 • 2022 • COMPUTER_STUDIES • essay

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

( a )
Write a complete Python program that fulfils the specifications above. Include comments that explain each major step.
( b )
Explain how the program you wrote in part (a) ensures that the processing continues even when the input file contains erroneous lines. Identify the specific Python constructs that achieve this robustness.
( c )
Modify the program so that the grade‑determination step uses a list comprehension to create a list of grades directly from the list of scores. Discuss how this change affects the program’s time‑complexity and readability.

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 Answer

About 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.

Unlock Full Access Available for Android & Windows
Chat with Support