Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

python question ! please show code and steps! Bonus Question 2 (Fibonacci Spiral

ID: 3672434 • Letter: P

Question

python question !

please show code and steps!

Bonus Question 2 (Fibonacci Spiral) [3 points]: The picture to the right consists of a repeating series of red, blue, green, and yellow quarter-circles. The black lines have been added for illustration: the radius of each arc is the sum of the radii of the two preceding arcs. For example, the radius of each blue one is the radius of the preceding red one plus the preceding yellow one. Thus the radii are the Fibonacci sequence and this spiral is called the

Explanation / Answer

import turtle

def fibonacciSpiral(n):
   colors = ['#FF0000', '#0000FF', '#00FF00', '#FFFF00']
   painter = turtle.Turtle()
   first = 0;
   second = 1;
   for i in range(0, n):
       painter.pencolor(colors[i % 4])
       painter.circle(second, 90)
       tmp = second
       second = first + second
       first = tmp
   turtle.done()