Question: Code in Python please. Goals: using loops and turtle graphics Problem: You are going to create a Python program that will draw a regular polygon

Code in Python please.

Code in Python please. Goals: using loops and turtle graphics Problem: You

Goals: using loops and turtle graphics Problem: You are going to create a Python program that will draw a "regular" polygon (one with each side of the same length and each angle of the same size) with number of sides between 3 and 12 as chosen by the user Your code should prompt the user to enter the number of sides he/she would like to see. Use a while loop to robustly (repeatedly) confirm that the number of sides is in the range of 3 and 12 including 3 and 12. (A message should be output to the user stating what is wrong and the user should be prompted to enter a new value.) Next use either a for loop or a while loop and turtle to draw the polygon with side of 60 pixels and a color other than black. Use a pen size of 6. The angle to turn left or right may be calculated as 360 divided by the number of sides. For example, the angle for a 12-sided polygon is 360/12 or 30. The angle for 6-sided polygon is 60 degrees. An example of a 12-sided polygon using a pen color of orange and a 6-sided polygon using a pen color of dark sea green is given below Think about which commands should be repeated and which commands should not be repeated. Do not put commands that do not need to be repeated inside a loop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!