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