Before you turn this problem in, make sure everything runs as expected. First, restart the kernel (in the menubar, select Kernel$\rightarrow$Restart) and then run all cells (in the menubar, select Cell$\rightarrow$Run All).

Make sure you fill in any place that says YOUR CODE HERE or "YOUR ANSWER HERE", as well as your name and collaborators below:

In [ ]:
NAME = "Alyssa P. Hacker"
COLLABORATORS = "Ben Bitdiddle"

Consider the following piece of code:

def f(x):
    if x == 0 or x == 1:
        return x
    return f(x - 1) + f(x - 2)

Part A (1 point)

Describe, in words, what this code does, and how it does it.

It computes the fibonacci sequence using recursion, with base cases of $x=0$ and $x=1$.


Part B (2 points)

For what inputs will this function not behave as expected? What will happen?

It computes the fibonacci sequence using recursion, with base cases of $x=0$ and $x=1$.