Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How Many Fibonacci Numbers are Required to Accurately Estimate The Golden-Ratio? Fibonacci numbers are formed by adding the two preceding numbers as shown in the
How Many Fibonacci Numbers are Required to Accurately Estimate The Golden-Ratio? Fibonacci numbers are formed by adding the two preceding numbers as shown in the series. F=1,1,2,3,5,8,13. The ratio of the Fibonacci number FnFn+1 approaches , the Golden-Ratio, for large values of n. In a well-documented Python program, hmwk3Q2.py, implement a program that calculates the Fn Fibonacci number and forms the ratio which approximates . Inside a while-loop, your program will continue to calculate the next Fibonacci until a specified level of precision in the estimate is achieved, when compared to the exact value for the Golden-Ratio. The Golden-Ratio is =21+5. Your program should accept and an integer M from the user. M represents the accuracy of the estimate by comparing your estimate with 10M. That is, if M=2, then your program should increment n until FnFn+2102 or 0.01. As a comment in your program list the number of Fibonacci terms required to attain accuracy to M=9. That is 109. Hints: Inside a while-loop continue to form another Fibonacci number until abs (FnFnplus)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started