What do you do?

1
2
3
4
5
6
7
8
def isfun(n):
    if n == 1:
        return True
    if n == 0:
        return False
    if (n % 3 != 0):
        return False
    return isfun(n / 3)

What does the isfun() function shown above do?

Details

\(n\) is a non-negative integer

×

Problem Loading...

Note Loading...

Set Loading...