Question: For this exercise you will create a program that draw objects using a character. You must only use the python shell to display the objects

For this exercise you will create a program that draw objects using a character. You must only use the python shell to display the objects and thus no usage for simple graphics library in this exercise. Your program will first display a numbered list of objects that can be drawn. There will be four objects: square, triangle, rectangle (any triangle), and parallelogram. User can enter anytime 0 to quit the program. Program steps: 1. Program display a list of objects that can be drawn. There will be four objects: square, triangle, rectangle, and parallelogram. User should select an object to draw, by selecting the object's number: 2. a. Check if the selected number is between 1 and 4. If not, then print an invalid message and ask the user to enter another number then quit Check if only one character is entered. If not, then print an invalid message and b. If user enter 0 then program should display the number of objects drawn and 3. Ask for the character that need to be used when drawing a. ask the user to enter another number b. If user enter 0 then program should display the number of objects drawn and then quit 4. Ask for object's dimensions: If user selected square to be drawn, then you should only ask for the length of one side a. b. If user select rectangle then you need to ask for the width and height c. If user select parallelogram then you need to ask for the width and the height d. If user select triangle then you need to ask for the height of the triangle. You can draw any triangle type you want. e. If user enter 0 then program should display the number of objects drawn and then quit 5. Go to step 2 6. Program exits when user enters o You may use the output message shown in the samples below or create a message of your own to create a humorous message. Any custom messages should be family friendly. Make sure you include comments Example input and out Please select one of the following objects to draw -Square 2- Triangle 3- Rectangle Your Selection ia: 4 Please enter the characater need to be used for dravings Please enter the width of the prallelogam: 10 Please enter the height of the prallelogram: 5 Please select one of the toilowing objects to draw 1- Square 2-Triangle 3- Rectangle Your Selection is 3 Ple 5e enter the charac ater need to b used for drawing: * Please enter the width of the rectangle: 10 Please enter the height of the rectangle: Plea?e ?eleat one of the following object to draw 1-Square 2-Triangle 3- Rectangle -Parallelogram Your Selection 1s:0 Total nunber of deawn objects is 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
