Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As you know from basic geometry, each shape has its own area formula. Let's write a python function that will provide the area for the

image text in transcribed

As you know from basic geometry, each shape has its own area formula. Let's write a python function that will provide the area for the following basic shapes: sphere, triangle, rectangle and circle. Depending on the shape specified by the user, the function will be asking the user to input the associated values needed to calculate the area, then prints out the value of the calculated area. When you execute your code you will get the following message: Which shape are you interested in? Assuming the user inputs "sphere" as an answer, the program should now ask the user to input the value of the radius: Please enter the value of the radius: Then the calculated area will be printed out to the screen: The area of a sphere of radius value is value Here are some examples as executed in Wing 101: Example 1: Which shape are you interested in: sphere Please enter the radius of the sphere: 5 The area of a sphere of radius 5.0 is 314.1592653589793 Example 2: Which shape are you interested in: ellipse You have entered an invalid shape name. Only the following shapes are supported: sphere, triangle, rectangle or circle

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions

Question

What are the best practices for managing a large software project?

Answered: 1 week ago

Question

How does clustering in unsupervised learning help in data analysis?

Answered: 1 week ago

Question

1. Identify the sources for this conflict.

Answered: 1 week ago

Question

3. The group answers the questions.

Answered: 1 week ago