Neco 2024 Computer Studies Question 8

Practice essay / theory question 8 from the 2024 Neco Computer Studies examination. This question covers Python programming, Lists and loops, Functions, Exception handling, Algorithmic analysis .

Neco 2024 Computer Studies Essay / Theory
Topics: Python programming Lists and loops Functions Exception handling Algorithmic analysis
Question 8 NECO • 2024 • COMPUTER_STUDIES • essay

You are required to write a Python program that analyses a list of students' examination scores. Answer the following:

Question Parts

( a )
Write a Python function named **analyse_scores** that accepts a list of integer scores and returns a dictionary with the keys: • 'average' – the arithmetic mean of the scores, • 'max' – the highest score, • 'min' – the lowest score, • 'grade_counts' – a dictionary giving the number of scores in each grade category where: A : score ≥ 70 B : 60 ≤ score < 70 C : 50 ≤ score < 60 D : 40 ≤ score < 50 F : score < 40 The function should raise a **ValueError** if the input list is empty.
( b )
Using the function you wrote, show the output produced for the following data set: scores = [85, 72, 68, 55, 49, 38, 91, 64, 57, 43]
( c )
Explain the algorithmic steps employed in your function and state its time‑complexity using Big‑O notation.
( d )
Identify two possible runtime errors that could occur when the function is used and show how you would modify the function to handle them using **try‑except** blocks.

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

The question covers Python programming, Lists and loops, Functions, Exception handling, Algorithmic analysis .

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