Add README
This commit is contained in:
parent
071d5b5d4b
commit
0a46f30e92
2 changed files with 28 additions and 1 deletions
27
README.md
Normal file
27
README.md
Normal file
|
@ -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.
|
||||||
|
```
|
|
@ -65,7 +65,7 @@ def main():
|
||||||
total_items = sum(amount for amount, _ in prices)
|
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()
|
||||||
|
|
||||||
print(" # | Normal price | Reduction price")
|
print(" # | Normal price | Reduction price")
|
||||||
|
|
Loading…
Reference in a new issue