Neco 2022 Computer Studies Question 8

Practice essay / theory question 8 from the 2022 Neco Computer Studies examination. This question covers Basic Programming, Python, Control Structures, File I/O .

Neco 2022 Computer Studies Essay / Theory
Topics: Basic Programming Python Control Structures File I/O
Question 8 NECO • 2022 • COMPUTER_STUDIES • essay

You are tasked with writing a Python program to process a list of student examination scores and generate a summary report.

Question Parts

( a )
Write a Python program that: 1. Stores the following scores in a list: 78, 85, 62, 90, 55, 73, 88, 47. 2. Calculates the class average (rounded to two decimal places). 3. Assigns a grade to each score using the criteria: - 80–100: A - 70–79 : B - 60–69 : C - 50–59 : D - below 50: F 4. Prints a table showing each student's score and corresponding grade, followed by the class average. Provide the complete program code.
( b )
Explain the algorithmic steps your program follows and state its time complexity in Big‑O notation.
( c )
Modify the program so that it reads the scores from a text file named "scores.txt" (one integer per line). Include error handling to skip any non‑numeric lines and report the number of invalid entries ignored. Provide the updated code.

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 Neco 2022 Computer Studies Question 8. It is one of the essay questions from the 2022 Neco Computer Studies examination.

The question covers Basic Programming, Python, Control Structures, File I/O .

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