Add README

This commit is contained in:
Midgard 2019-03-14 20:11:12 +01:00
parent 071d5b5d4b
commit 0a46f30e92
2 changed files with 28 additions and 1 deletions

27
README.md Normal file
View 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.
```

View file

@ -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")