This commit is contained in:
1 parent
5d68424778
commit
bfa2a74998
1 file changed
+3
@@ -9,4 +9,7 @@ def circle_area(radius: float):
|
||||
:raises ValueError: radius is negative
|
||||
:return: area of the circle
|
||||
"""
|
||||
if radius < 0:
|
||||
raise ValueError("Circle can't have negative radius")
|
||||
|
||||
return math.pi * radius ** 2
|
||||
Reference in new issue
Block a user