City Guilds Model Questions Vol1 2025 Information Technology Question 4

Practice objective / multiple choice question 4 from the 2025 City Guilds Model Questions Vol1 Information Technology examination.

City Guilds Model Questions Vol1 2025 Information Technology Objective / Multiple Choice Hard Difficulty
Question 4 CITY_GUILDS_MODEL_QUESTIONS_VOL1 • 2025 • INFORMATION_TECHNOLOGY • objective

Consider the following pseudo‑code function that operates on a positive integer n:\n\n``` function mystery(n): if n = 1 then return 1 else if n is even then return mystery(n/2) + mystery(n/2 + 1) else return 2 * mystery((n-1)/2) ```\n\n(a) Compute the value returned by `mystery(7)`.\n(b) Prove briefly that for every positive integer n, `mystery(n) = n`. Provide the answer for part (a) and a concise justification for part (b).

Answer Options

A. 5
B. 3
C. 6
Correct Answer D. 4
Correct Answer
D
Correct Option:
4

About This Question

This is City Guilds Model Questions Vol1 2025 Information Technology Question 4. It is one of the objective questions from the 2025 City Guilds Model Questions Vol1 Information Technology 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