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.
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
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.