In this challenge you will design an algorithm to calculate the area of various shapes as listed below:
|Rectangle||width x length|
|Circle||pi x radius2|
|Triangle||base x height / 2|
Your algorithm should:
- Ask the user which of the above four shapes they would like to calculate the area of,
- Based on the chosen shape, your algorithm should ask the end user to enter the required dimensions (e.g. width, or width and length or radius or base and height),
- Calculate and display the area of the chosen shape.
Use our flowchart desing tool to create the flowchart of your algorithm. Online Flowchart Creator
Once you have completed your flowchart, you can implement this algorithm using Python code.
|Test #||Input Values||Expected Output||Actual Output|
Complete your algorithm to cater for additional shapes including parallelograms, rhombus and hexagons.
Solution...The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area