diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f149aa --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# simprizza + +``` +$ ./simprizza.py +Reduction in cents: 1295 + +Price 1 in cents: 1295 + Amount of orders at this price: 3 + +Price 2 (empty to finish): 1495 + Amount of orders at this price: 1 + +Price 3 (empty to finish): + +---------------- + +You got a reduction of 24% + + # | Normal price | Reduction price +---|--------------|---------------- + 3 | € 12.95 | € 9.84 + 1 | € 14.95 | € 11.36 +---|--------------|---------------- + 4 | € 53.80 | € 40.88 + You paid € 40.85 +This solution has a bonus of 3¢ for the courier. +``` diff --git a/simprizza.py b/simprizza.py index 3bf0800..ec61524 100755 --- a/simprizza.py +++ b/simprizza.py @@ -65,7 +65,7 @@ def main(): total_items = sum(amount for amount, _ in prices) - print(f"You got {reduction_percentage:.0%} reduction") + print(f"You got a reduction of {reduction_percentage:.0%}") print() print(" # | Normal price | Reduction price")