School Olympiads - National Cyber Olympiad & AI Foundation (NCO)

Achievers Section: Algorithmic Complexity & Logic Optimization question bank (Emerging Technologies & Achievers Section)

Practice 6 free School Olympiads - National Cyber Olympiad & AI Foundation (NCO) Emerging Technologies & Achievers Section - Achievers Section: Algorithmic Complexity & Logic Optimization questions with answers and step-by-step solutions.

Q1.
[Achievers Section - 3 Marks]
Consider the following recursive function:
def fun(n):
    if n <= 1:
        return 1
    return n * fun(n - 2)
What will be the return value of fun(7)?

(A)
{'key': 'A', 'text': '105'}
(B)
{'key': 'B', 'text': '720'}
(C)
{'key': 'C', 'text': '48'}
(D)
{'key': 'D', 'text': '35'}
Show answer & solution
Verified Answer & Solution Locked
Sign in to your free student account to reveal verified answers, instant hints, and detailed explanations.
Sign in to view

Sign up free to access all 1 questions

Unlock every Achievers Section: Algorithmic Complexity & Logic Optimization question, generate papers, and practice at your own pace.