Gce Model Questions Vol1 2017 Computer Studies Question 39

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

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

Consider the following Python function:\n\n```python\ndef transform(data):\n result = {}\n for key, values in data.items():\n total = 0\n for i, v in enumerate(values):\n if i % 2 == 0:\n total += v\n else:\n total -= v\n if total % 2 == 0:\n result[key] = total * len(values)\n return result\n```\n\nIf `data = {'A':[3,5,2,8], 'B':[7,1,4], 'C':[6,6,6,6,6]}`, what integer value is associated with the key `'B'` in the dictionary returned by `transform`?

Answer Options

A. 32
B. 24
C. 28
Correct Answer D. 30
Correct Answer
D
Correct Option:
30

About This Question

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