$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #34

Fill the comparison for the Fibonacci base case (n = 0 or 1).

def fib(n):
    if n ____ 2:
        return n
    return fib(n-1) + fib(n-2)

Answer: < (also accepted: <)

if n < 2 returns n for the base cases 0 and 1.
Play Problem Solving ▸