ChamplainTechJournals/python-csi160/week03/Week-3Practice-Problems/part6.py
2025-04-19 23:42:08 -04:00

13 lines
No EOL
289 B
Python

from math import pi # This lets you refer to pi in your code
def volume_cone(radius, height):
"""Computes volume of a cone
:param radius: positive float
:param height: positive float
:return: volume of given cone
"""
return 1/3 * pi * (radius*radius) * height