You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defcalculate_area(radius):
""" Calculate the area of a circle given its radius. Parameters ---------- radius : float The radius of the circle. Must be a non-negative value. Returns ------- float The area of the circle. Raises ------ ValueError If the radius is negative. Examples -------- >>> calculate_area(5) 78.53981633974483 """ifradius<0:
raiseValueError("Radius cannot be negative")
returnmath.pi*radius**2
In docstrings of functions
The text was updated successfully, but these errors were encountered: