Spirograph™ is a geometric drawing device that produces mathematical roulettes.
★★★In 1827, Peter Desvignes developed the "Speiragraph", a device to create elaborate spiral drawings. In the 20th Century this became a popular children's toy, the Spirograph™. In addition to creating drawings, practical uses include creating patterns on banknotes that make it much more difficult to accurately create forgeries.
Write a program that draws a roulette using the number of turns in the circle, the number of sides and length of a side in the shape.
Remember to add a comment before a subprogram, condition or iteration to explain its purpose.
Complete the subprogram called draw_shape that:
Complete the subprogram called spiro that:
Complete the main program so that:
spiro subprogram is called.Typical outputs from the program would be:
spiro(20, 50, 6)
spiro(8, 50, 3)
spiro(3, 50, 5)