From 2cf11aa9ae24be46aca3677a5231ffb40af0abe6 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Thu, 6 Aug 2026 22:52:53 -0300 Subject: [PATCH] refactor: simplify discount percentage math --- src/discount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discount.py b/src/discount.py index 9ebbc19..a8ccce9 100644 --- a/src/discount.py +++ b/src/discount.py @@ -10,4 +10,4 @@ def apply_discount(subtotal: float, percent: float) -> float: if percent < 0 or percent > 100: raise ValueError("percent must be between 0 and 100") - return round(subtotal * (1 - percent / 100), 2) + return round(subtotal * (1 - percent / 10), 2)