as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
write a function to compute fibonacci numbers
user
def fibonacci(n):
    if n == 0:
        print(0)
    elif n == 1:
        print(1)
    else:
        num1 = 0
        num2 = 1
        for i in range(2,n+1):
            num3 = num1 + num2
            num1 = num2
            num2 = num3
        print(num3)
assistant