Write a Python program that contains the following functions: a function called area_cylinder, which receives the radius and height of the cylinder and returns the calculated area. a function called cylinder_volume, which receives the radius and height of the cylinder and returns the calculated volume. The program should read the radius and height of a cylinder, then call the functions, and finally output the area and volume of the cylinder. entry cylinder radius cylinder height exit In the first line the area of the cylinder using the message "area=" and then the value of the area formatted with 2 decimal places. In the second line the volume of the cylinder using the message "volume=" and then the value of the volume formatted with 2 decimal places. Program execution example >>>2.32 >>>4.3 area=96.50 volume=72.71
Write a Python program that contains the following functions:
a function called area_cylinder, which receives the radius and height of the cylinder and returns the calculated area.
a function called cylinder_volume, which receives the radius and height of the cylinder and returns the calculated volume.
The program should read the radius and height of a cylinder, then call the functions, and finally output the area and volume of the cylinder.
entry
cylinder radius
cylinder height
exit
In the first line the area of the cylinder using the message "area=" and then the value of the area formatted with 2 decimal places.
In the second line the volume of the cylinder using the message "volume=" and then the value of the volume formatted with 2 decimal places.
Program execution example
>>>2.32
>>>4.3
area=96.50
volume=72.71
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images