Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prices = {
- "banana": [2.50, 2.70],
- "apple": [1.20, 1.25],
- "orange": [0.85, 0.90],
- "grapefruit": [1.45, 1.60],
- "kiwi": [2.70, 3.00],
- "pineapple": [5.50, 5.60],
- "grapes": [3.85, 4.20]
- }
- days_of_the_week = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
- try:
- fruit_prices = prices[input()][days_of_the_week.index(input()) // 5]
- print(f"{fruit_prices * float(input()):.2f}")
- except (KeyError, ValueError):
- print("error")
Add Comment
Please, Sign In to add comment