import math def circle_area(radius: float): """Calculate the area of a circle :param radius: circle radius :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