Question: using python to create code Question 4 (4 points) [4] A sequence (similar to the Fibonacci sequence) is defined by F1 = 0, F2 =

 using python to create code Question 4 (4 points) [4] A

using python to create code

Question 4 (4 points) [4] A sequence (similar to the Fibonacci sequence) is defined by F1 = 0, F2 = 1, and Fn+2 = = Fn + 3Fn+1, where n > 1. Write a function Fibonacci(n) which returns the list (call it fib) of the first n terms of this Fibonacci sequence (so Fibonacci(5) should return [0,1,3,10,33]). Make sure that Fibonacci(1) returns [0] and Fibonacci(2) returns [0,1]. Use the function you created to compute the sum 200 Fn n=2 Fn-Fn+1 (for this part, you can write a function, but don't have to). 2222 Fn-Fath

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!