Gce Model Questions Vol1 2022 Computer Studies Question 21

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

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

Consider the following Python function: ```python def mystery(m): total = 0 for i in range(1, m+1): if i % 2 == 0: total += i//2 else: total += (i*3 + 1) % 5 return total n = 7 result = mystery(n) + mystery(n-2) print(result) ``` What number is printed when the program is executed?

Answer Options

Correct Answer A. 21
B. 22
C. 20
D. 24
Correct Answer
A
Correct Option:
21

About This Question

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