Generation

generate functionThu, 19 Jan 2023

Create a program to find the volume v of a cylinder and c of a cone by entering the radius r and height h.

def cylinder_volume(r, h): return math.pi * r**2 * h def cone_volume(r, h): return cylinder_volume(r, h)/3 cylinder_volume(2, 3) cone_volume(2, 3)

Questions about programming?Chat with your personal AI assistant