Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

Explain the significance of employee selection.

Answered: 1 week ago

Question

Discuss the performance appraisal process.

Answered: 1 week ago