Fix circle_area function

This commit is contained in:
2021-11-05 01:14:54 +01:00
parent 7a944caf44
commit 9f6012b9ce

View File

@@ -7,7 +7,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")
if radius < 0:
raise ValueError("Circle can't have negative radius")
return math.pi * radius ** 2