Problem #1
Part A: Create a program that allows the user to input the first two digits of a Fibonacci sequence and the number of elements desired. The program should output a graph in polar coordinates of the sequence desired by the user.
Pictured below is a graph of the result from entering 1 and 2 as the first two digits for the first 6 elements of the Fibonacci sequence.
Part B: Create a program that allows the user to enter the first two elements of a Fibonacci sequence that will determine the number of terms required to reach the "golden ratio".
Problem 2: Create a square root function using loops
This is a function created using Halley's method for approximating the square root.
Using the function above, a program was written to allow the user to input the number they wish to square root, as well as their best guess. Both points of information are used to approximate the square root.
No comments:
Post a Comment