Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Input, Output and Processing Create a console program named SphereCalc that that calculates both the volume and the area of a sphere, given a

image

Input, Output and Processing Create a console program named SphereCalc that that calculates both the volume and the area of a sphere, given a radius r. The volume V, and the area A, are calculated by using the formulas: A = 4r2 4 .3 V = r and 3 Here is what the output of your program should look like: r CS170: Sphere Calculator ### Enter the radius of the sphere: 8.3 Sphere Volume: 2395.0957848241965 Sphere Surface Area: 865.6972716232036 Line #1 and all prompts and output should appear exactly as shown. Line #2 is the same length as Line #1 and uses the # symbol. Lines #3 and #5 are blank while line #4 begins with a prompt. Input should occur on the same line as the prompt. #6 and #7 must contain "Sphere Volume: " and "Sphere Surface Area: The volume and area should not be formatted. Just use concatenation. Use Math.PI, not a literal value for pi. Use Math.pow(). Remember the difference between integer and real division. 11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

PYTHON import math printCS170 Sphere Calculator ... 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

Step: 3

blur-text-image

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

Matlab An Introduction with Applications

Authors: Amos Gilat

5th edition

1118629868, 978-1118801802, 1118801806, 978-1118629864

More Books

Students also viewed these Programming questions

Question

What do we know about police officers as eyewitnesses?

Answered: 1 week ago

Question

What do we know about elderly people as eyewitnesses?

Answered: 1 week ago