Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pastry = input()
- ordered_pastries = int(input())
- day = int(input())
- price_before = 0
- price = 0
- discount2 = 0
- discount = 0
- if day <= 15:
- if pastry == "Cake":
- price_before = ordered_pastries * 24
- if pastry == "Souffle":
- price_before = ordered_pastries * 1.66
- if pastry == "Baklava":
- price_before = ordered_pastries * 12.60
- if day > 15:
- if pastry == "Cake":
- price_before = ordered_pastries * 28.70
- if pastry == "Souffle":
- price_before = ordered_pastries * 9.80
- if pastry == "Baklava":
- price_before = ordered_pastries * 16.98
- else:
- pass
- else:
- pass
- if day <= 22:
- if 100 < price_before < 200:
- discount = price_before * 0.15
- price = price_before - discount
- elif price_before > 200:
- discount = price_before * 0.25
- price = price_before - discount
- else:
- discount = 0
- price = price_before - discount
- elif day > 22:
- discount = 0
- price = price_before - discount
- else:
- pass
- if day <= 15:
- discount2 = price * 0.10
- price = price - discount2
- elif day > 15:
- discount2 = 0
- price = price - discount2
- else:
- pass
- print(f'{price:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement