Answered step by step
Verified Expert Solution
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:
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: 5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started