Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN PYTHON: Create a program that has a menu in a repeating loop where the user can choose to display one of the following four

IN PYTHON:

image text in transcribed

Create a program that has a menu in a repeating loop where the user can choose to display one of the following four triangles, or to exit the program. Check that the user's input is between 1 and 5 for the menu, and between 1 and 25 for the triangle's size Triangle 1 - Top Left Corner Prompt the user to enter the size of the triangle (x). Display a triangle made of"%" (or o', X'), where its base and height are x and are oriented in the top left corner Triangle 2 - Top Right Corner Prompt the user to enter the size of the triangle (x). Display a triangle made of"%" (or o', X), where its base and height are x and are oriented in the top right corner Triangle 3 - Bottom Left Corner Prompt the user to enter the size of the triangle (x). Display a triangle made of"%" (or o', x'), where its base and height are x and are oriented in the bottom left corner Triangle 4 - Bottom Right Corner Prompt the user to enter the size of the triangle (x). Display a triangle made of (or '.' o', X'), where its base and height are x and are oriented in the bottom right corner Sample Output Enter size of triangle: 5 Menu 1. TL Triangle 2. TR Triangle 3. BL Triangle 4. BR Triangle 5 Quit Menu: 1. TL Triangle 2. TR Triangle 3. BL Triangle 4. BR Triangle 5. Quit Invalid Input. Menu: 1. TL Triangle 2. TR Triangle 3. BL Triangle 4. BR Triangle 5 Quit 1 Enter size of triangle: 27 Invalid Input Enter size of triangle: 5

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

More Books

Students also viewed these Databases questions

Question

What are the steps involved in the HR planning process?

Answered: 1 week ago

Question

=+ Is secondary industrial action common and/or legal?

Answered: 1 week ago

Question

=+What sanctions are available to employers

Answered: 1 week ago

Question

=+ If strikes occur, are they legally regulated?

Answered: 1 week ago