1.12. Exercise: Circle and Sphere ¶
Write a program that inputs a radius r from the user and computes the area of a circle with radius r and the volume of a sphere with radius r. (Print 2 digits after the decimal point)
Hint: You can use the \(\color{purple}{\texttt{math}}\) module to import the \(\color{purple}{\texttt{pi}}\) constant.
Sample I/O:
Input:
5
Output:
circle area: 78.54
sphere volume: 523.60
Input:
4.25
Output:
circle area: 56.75
sphere volume: 321.56