Arithmetic operators · 13 / 18 Exercise Easy

Calculate the dimensions of a sphere

Objective

Create a Python program that calculates the surface area and the volume of a sphere, given its radius.

  • surface = 4 * pi * radius squared
  • volume = 4 / 3 * pi * radius cubed

Instructions

  • Ask the user for the radius of the sphere.
  • Calculate the surface area of the sphere using the formula.
  • Calculate the volume of the sphere using the formula.
  • Display the surface area and the volume on separate lines, with 3 decimals. You can use the constant math.pi.
Input
60
Output
45238.934
904778.684

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise