--- kf_03-13T15-48-25-648687.py +++ kf_03-13T16-01-10-289415.py @@ -1,4 +1,5 @@ +import math class Name: def __init__(self, name: str): self.name = str(name) @@ -281,3 +282,9 @@ if radius < 0.0: raise ValueError("radius must be non‑negative") return (4.0 / 3.0) * math.pi * radius ** 3 +def cylinder_volume_m3(radius_m: float, height_m: float) -> float: + radius = float(radius_m) + height = float(height_m) + if radius < 0.0 or height < 0.0: + raise ValueError("radius and height must be non‑negative") + return (math.pi * radius ** 2) * height