Create a python program that can calculate the area of five (5) different geometric shapes of your choice. Your program must work as follows: 1. first prints a welcome message. 2. next, presents a list of five geometric shapes and the formula to calculate the area of those shapes. If more than one correct formula can be used to calculate the area of a particular shape, you can use any one of those. 3. asks the user to choose a shape (they will enter the serial number – an int). 4. takes the user’s selection as input and asks for additional information required to compute the area of the selected geometric shape. 5. calculates the area rounded to 2 decimal places and finally prints it out. Note: Your program must be able to compute areas for at least five (5) different geometric shapes of your choice. You must use the correct formula to calculate the output.   Sample output: ================================================ Please enter your name: Alice Hello Alice! Welcome to the Area Calculator program. Please select a shape to compute its area (enter 1 to 5): 1 - Rectangle (area = base * height) 2 – Shape2 (formula) 3 – Shape3 (formula) 4 – Shape4 (formula) 5 – Shape5 (formula) Your choice: 1 Enter base: 4.5 Enter height: 7.33 The area of the rectangle with base = 4.5 and height = 7.33 is 32.98 Thank you for using the Area Calculator program.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create a python program that can calculate the area of
five (5) different geometric shapes of your choice.
Your program must work as follows:
1. first prints a welcome message.
2. next, presents a list of five geometric shapes and the formula to calculate the area of those
shapes. If more than one correct formula can be used to calculate the area of a particular shape,
you can use any one of those.
3. asks the user to choose a shape (they will enter the serial number – an int).
4. takes the user’s selection as input and asks for additional information required to compute the
area of the selected geometric shape.
5. calculates the area rounded to 2 decimal places and finally prints it out.

Note: Your program must be able to compute areas for at least five (5) different geometric shapes
of your choice. You must use the correct formula to calculate the output.

 

Sample output:
================================================
Please enter your name: Alice
Hello Alice! Welcome to the Area Calculator program.
Please select a shape to compute its area (enter 1 to 5):
1 - Rectangle (area = base * height)
2 – Shape2 (formula)
3 – Shape3 (formula)
4 – Shape4 (formula)
5 – Shape5 (formula)
Your choice: 1
Enter base: 4.5
Enter height: 7.33
The area of the rectangle with base = 4.5 and height = 7.33 is 32.98
Thank you for using the Area Calculator program.
================================================

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education