1. What does the following code prints?
def simple_sum(a=1, b=2):
return a + b
b = 3
print simple_sum(4)
a) 7
b) 6
c) 5
2. Replace the following elements: def, return, print, assert in the following script:
XXX fib(n=10): series = [1 for i in range(n+1)]
for i in range(3,n):
series[i] = series[i-1] + series[i-2]
XXXX series
XXXX fib(5) == 5
XXXX fib(6)
Bonus question: Is the function thoroughly tested? Think about what would happen with fib(2)? fib(-1)?