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
Get step-by-step solutions from verified subject matter experts
