PDSA · WEEK 1 · PYQ PRACTICE

Practice one question at a time.

Answer first, check your work, then open a short, worked explanation.

← Back to Week 1
Question 1 of 15
0 correct answers checked in this session
Quiz 1 · Oct 2022Multiple choice

What does this function compute?

def fun(m, n):
    if m == n:
        return n
    if m > n:
        return fun(m - n, n)
    return fun(m, n - m)