Fix circle_area function
This commit is contained in:
@@ -7,7 +7,7 @@ def circle_area(radius: float):
|
|||||||
:raises ValueError: radius is negative
|
:raises ValueError: radius is negative
|
||||||
:return: area of the circle
|
:return: area of the circle
|
||||||
"""
|
"""
|
||||||
#if radius < 0:
|
if radius < 0:
|
||||||
#raise ValueError("Circle can't have negative radius")
|
raise ValueError("Circle can't have negative radius")
|
||||||
|
|
||||||
return math.pi * radius ** 2
|
return math.pi * radius ** 2
|
||||||
|
|||||||
Reference in New Issue
Block a user