Merge remote-tracking branch 'origin/master' into sw7_lap_detection
This commit is contained in:
commit
f03c720435
13 files changed
+314
-2
No files matched your search
@@ -0,0 +1,6 @@
|
||||
def discount_price(price: float, discount: float) -> float:
|
||||
if price < 0:
|
||||
raise ValueError("price cannot be negative")
|
||||
if not 0 <= discount <= 100:
|
||||
raise ValueError("discount must be between 0 and 100")
|
||||
return price - (price * discount / 100)
|
||||
Reference in new issue
Block a user