Gce Model Questions Vol1 2023 Computer Studies Question 41

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

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

Consider the following Python function: ```python def mystery(nums, flag=False): result = [] for i, n in enumerate(nums): if n % 2 == 0: result.append(n//2) else: result.append(3*n + 1) if flag and i == len(nums)//2: result = [x-1 for x in result] return result data = [5, 8, 3, 12, 7] print(mystery(data, flag=True)[2]) ``` What integer is printed when the program is executed?

Answer Options

A. 8
Correct Answer B. 9
C. 10
D. 12
Correct Answer
B
Correct Option:
9

About This Question

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