I have a homework assignment that I\'m stumped on. I\'m trying to write a program that outputs the fibonacci sequence up the nth number. Here\'s what I have so far:
def fib(n): if n == 1: return(1) elif n == 0: return(0) else: return fib(n-1) + fib(n-2) my_num = int(input("Enter a number:")) print fib(my_num)
Im not really sure what your question is... but the answer is probably something like this