Question: Write a python program that can compute the area of a circle, a triangle or a rectangle, based on the user choice. First the program

Write a python program that can compute the area of a circle, a triangle or a rectangle, based on the user choice. First the program should ask the user to choose their preference (circle, triangle or rectangle). Then the program should ask for the appropriate input: - If user's choice is circle, program should ask for a radius parameter. - If user's choice is triangle, program should ask for base and height parameters. - If user's choice is rectangle, program should ask for width and height parameters. The program should then calculate the area of the chosen shape, and print an output statement to report the area of that shape

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!