Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions projects/007-day-old-bread/python/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dayOldBread = int(input("Number of loaves of day-old:"))

regularPrice = dayOldBread * 3.49
discount = (regularPrice * 60) / 100
totalPrice = regularPrice - discount

print("Regular price: " + f"{regularPrice:>10.2f}")
print("Discount: " + f"{discount:>15.2f}")
print("Total price: " + f"{totalPrice:>12.2f}")