Question: code it in python please. The Fibonacci numbers are the sequence of numbers F1,F2,F3, where: - F1=F2=1 - Fn=Fn1+Fn2 The Fibonacci numbers for n=1,2,,8 are

code it in python please.
code it in python please. The Fibonacci numbers are the sequence of

The Fibonacci numbers are the sequence of numbers F1,F2,F3, where: - F1=F2=1 - Fn=Fn1+Fn2 The Fibonacci numbers for n=1,2,,8 are 1,1,2,3,5,8,13,21. Use the function design recipe to develop a function named fib. The function header (with missing type annotations) is: fib(n). Parameter n is a positive integer. The function returns the n th Fibonacci number. For example, fib(1) returns 1 and fib(6) returns 8 . Your function definition must have type annotations and a complete docstring. Your function must have exactly one loop. Type the function definition below the comment, \# Exercise 7. Use the Python shell to test fib

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!