Neco 2024 Computer Studies Question 2

Practice objective / multiple choice question 2 from the 2024 Neco Computer Studies examination.

Neco 2024 Computer Studies Objective / Multiple Choice Hard Difficulty
Question 2 NECO • 2024 • COMPUTER_STUDIES • objective

The following Python function processes a list of integers:\n\n```python\ndef process(nums):\n # remove duplicates\n uniq = list(set(nums))\n # sort in descending order\n uniq.sort(reverse=True)\n # sum numbers that are multiples of 3 but not of 5\n total = sum(x for x in uniq if x % 3 == 0 and x % 5 != 0)\n return total\n```\n\nIf the list passed to the function is \([12, 7, 15, 9, 12, 20, 33, 45, 9, 27, 30, 33]\), what integer does the function return?

Answer Options

Correct Answer A. 81
B. 135
C. 171
D. 198
Correct Answer
A
Correct Option:
81

About This Question

This is Neco 2024 Computer Studies Question 2. It is one of the objective questions from the 2024 Neco Computer Studies examination.

Difficulty level: Hard .

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