Question: Help me to do question 4. Use python! Question 4: Fibonacci Sequence (3 points) The Fibonacci sequence has the form 1, 1,2,3,5,8, Each successive number,

 Help me to do question 4. Use python! Question 4: FibonacciHelp me to do question 4. Use python!

Question 4: Fibonacci Sequence (3 points) The Fibonacci sequence has the form 1, 1,2,3,5,8, Each successive number, after the first two, is found by adding the previous two numbers in the sequence. For example, the 7th number in the sequence is 5+8 13. A possibly useful hint: We might not have explicitly talked about it in class yet, but one really useful thing that Python allows you to do is index lists using negative numbers, which allows you to move backwards through the list as you increase the size of the negative number, starting with-1. That means that if I have the list stuff- [1,2,3,41,1can do stuff[-1] and I'll get the last number, 4'lf1want the second to last number, I would do stuff!-2]. Your goal is to write a function that computes 100 terms in the sequence. You function should accept a value (n) (the number of terms in the sequence you wish to compute) and return the list containing the first 100 terms of the Filbonacci sequence. Test your function for n #4.5,6,7 to ensure they match up with the sequence above. # write your solution to question 4 in this cell # Define your function here # Call your functidh here

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!