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 vol(rad, h): vol_cyl = math.pi * (rad ** 2) * h vol_cone = (1/3) * math.pi * (rad ** 2) * h return vol_cyl, vol_cone

Questions about programming?Chat with your personal AI assistant