Question: Create a turtle graphics Python program that performs the following: Asks the user whether they want to draw a square or a triangle Then asks

Create a turtle graphics Python program that performs the following: Asks the user whether they want to draw a square or a triangle Then asks the user how long they want the sides to be Draws the requested shape on the screen (See Figure 1 below for an example)Reports the X and Y coordinates and the turtle's heading after the turn for each corner to the console (See Table 1 below for an example)Helpful tip: The turtle will report the X and Y coordinates using decimals, use the format function to display as integer values Repeats the above steps to allow the user to specify a second shape to draw The drawing window should be a color not used in the other drawing elements The drawing window should have an appropriate title Upload your PY code file to the appropriate Blackboard assignmentFigure A - Example PrawneWhat do you want melto draw? (1- square, 2- triangle): 1I will draw a square.How long do you wantthe sides of your square to be?Please enter the number of pixels (e.g.100): 300My 1st conner isF150, and my heading is 90.0My 2nd corner is150,300 and my heading is180.0My 3rd corner is-150: 300 and my heading is 270.0My 4th corner is-150 and my headingis 0.0What do you want me to draw? (1-square, 2= triangle): 2I will draw an equilateral triangle.How long do you want the sides of your triangle to be? Please enter the number of pixels (e.g.100):300My 1st corner is ati150,-8 and my heading is 120.0My 2nd corner is at:260 and my heading is 240.0My 3nd cornen is at -150,0 and my heading is 0.0

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!