Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fibonacci Numbers The Fibonacci sequence, which is strongly related to the golden ratio, is defined as: F 0 = 0 , F 1 = 1

Fibonacci Numbers
The Fibonacci sequence, which is strongly related to the golden ratio, is defined as:
F0=0,F1=1,
and
Fn=Fn-1+Fn-2
for cases where n>1. Strictly greater than one? Yes, the cases of n=0 and n=1 are defined for us above.
The first few numbers in this sequence are provided here, just for context:
0,1,1,2,3,5,8,13,21,34,dots
Using a for loop, calculate the first 27 numbers in the Fibonacci sequence.
Next, calculate the ratio between each of the numbers in the sequence. The ratio can be defined as:
Rn=Fn-1Fn
As a hint for each of these challenges, ask yourself, do you start with 1 and go to 27? Or is it maybe something else that you need to start at, or end at?
The following section is not for points: Finally, plot both the sequence and the ratio against the iteration number.
Meaning, the 20th lerm (x) against the 20th Fibonacci number (y).
And, the 21st term (x) against the 20th ratio (y).(ypu aren't being tested on this plot this time, but it's good to figure this out for when you will be assessed on it)
Looking at your plot, where does it look like the ratio has stabilized? Where does the ratio stop changing much?
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions