Question from the Python - Fundamentals test

What is the output of the following code?

Archived

What is the output of this code?

def foo(n):
    if n <= 1:
        return n
    else:
        return foo(n-1) + foo(n-2)

print(foo(5))
Author: Amani BEN HADJ BRAIEKStatus: Archived(New question!)Question passed 143 times
-1
Community EvaluationsNo one has reviewed this question yet, be the first!