Gce Model Questions Vol1 2018 Computer Studies Question 18

Practice objective / multiple choice question 18 from the 2018 Gce Model Questions Vol1 Computer Studies examination.

Gce Model Questions Vol1 2018 Computer Studies Objective / Multiple Choice Hard Difficulty
Question 18 GCE_MODEL_QUESTIONS_VOL1 • 2018 • COMPUTER_STUDIES • objective

Consider the following Python function: ```python def mystery(nums): total = 0 for i in range(len(nums)): for j in range(i+1, len(nums)): if (nums[i] + nums[j]) % 3 == 0: total += nums[i] * nums[j] return total ``` If the list `nums` is \([4, 7, 2, 5, 9]\), what integer value does `mystery(nums)` return?

Answer Options

A. 71
B. 85
Correct Answer C. 77
D. 63
Correct Answer
C
Correct Option:
77

About This Question

This is Gce Model Questions Vol1 2018 Computer Studies Question 18. It is one of the objective questions from the 2018 Gce Model Questions Vol1 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