Write a Python program that will be able to take radius of a sphere as an input from the user and calculate the surface
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write a Python program that will be able to take radius of a sphere as an input from the user and calculate the surface
Write a Python program that will be able to take radius of asphere as an input from the user and calculate the surface area andthe volume of a sphere. You have to write two functionsgetArea(radius) and getVolume(radius). The output will be asbelow:For a sphere of radius <radius>, the surface area is<area> and the volume is <volume>.Note: The surface area of a sphere is (4 x π x r2) and the volumeof a sphere is(4/3 x π x r3), where r stands for radius of thesphere.