migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
13
python-csi160/week03/Week-3Practice-Problems/part6.py
Normal file
13
python-csi160/week03/Week-3Practice-Problems/part6.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue