def calculate_discount(price: float, discount: int) -> float: if discount > 50: raise ValueError("Discount can't be more than 50%") else: return price - (price / 100) * discount