Write a recursive function named fibo that accepts a positive integer n
as argument and returns the nth Fibonacci number. For this problem, F1 = 1 and
F2 = 1 are the first two Fibonacci numbers, and every later term is the sum of
the two terms before it.
Every recursive function has two parts: the recursive call and the base case. Here the recursive call comes from Fn = F(n-1) + F(n-2), and the base case comes from F1 = F2 = 1.
You do not have to accept input from the user or print anything to the console. You just have to write the function definition.
Example
fibo(1) -> 1
fibo(3) -> 2
fibo(10) -> 55
Implement this function:
def fibo(n):
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: n.
Input
1
Output
1