def calculate_discount(price, pct):
"""Calculate the discounted price.
Args:
price: The original price.
pct: Discount percentage (0-100).
Returns:
Price after applying the discount.
Raises:
ValueError: If pct is out of range.
"""
if pct < 0 or pct > 100:
raise ValueError(...)