Gce Model Questions Vol1 2021 Computer Studies Question 8
Practice essay / theory question 8 from the 2021 Gce Model Questions Vol1 Computer Studies examination. This question covers Python programming, File handling, Functions, List comprehensions, Exception handling, Data processing .
You are required to develop a Python program that processes a text file named **students.txt**. Each line of the file contains a student's name followed by three integer test scores, separated by commas, for example: ``` Ada,78,85,92 Bola,64,70,58 Chinwe,90,88,95 ``` The program must: 1. Read the data safely, handling possible missing scores or extra whitespace. 2. Compute a weighted average for each student where the first test counts 20%, the second 30% and the third 50%. 3. Determine the class average (mean of all students' weighted averages) and the pass rate (percentage of students whose weighted average is at least 60). 4. Produce a neatly formatted report that lists: - The top three students by weighted average (show name and average); - The overall class average rounded to two decimal places; - The pass rate as a percentage rounded to one decimal place. 5. The program must use at least one user‑defined function, a list comprehension, and appropriate exception handling. Write the complete Python code that fulfils the above requirements and briefly explain how each part of the code meets the specifications.
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 2021 Computer Studies Question 8. It is one of the essay questions from the 2021 Gce Model Questions Vol1 Computer Studies examination.
The question covers Python programming, File handling, Functions, List comprehensions, Exception handling, Data processing .
Master the Exam!
You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.