Fix circle_area function
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user