Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fruit = input()
- week_day = input()
- num = float(input())
- total = 0
- if week_day == "Monday" or week_day == "Tuesday" or week_day == "Wednesday" or week_day == "Thursday" or \
- week_day == "Friday":
- if fruit == "banana":
- total = num * 2.50
- elif fruit == "apple":
- total = 1.20 * num
- elif fruit == "orange":
- total = 0.85 * num
- elif fruit == "grapefruit":
- total = 1.45 * num
- elif fruit == "kiwi":
- total = 2.70 * num
- elif fruit == "pineapple":
- total = 5.50 * num
- elif fruit == "grapes":
- total = 3.85 * num
- elif week_day == "Saturday" or week_day == "Sunday":
- if fruit == "banana":
- total = 2.70 * num
- elif fruit == "apple":
- total = 1.25 * num
- elif fruit == "orange":
- total = 0.90 * num
- elif fruit == "grapefruit":
- total = 1.60 * num
- elif fruit == "kiwi":
- total = 3.00 * num
- elif fruit == "pineapple":
- total = 5.60 * num
- elif fruit == "grapes":
- total = 4.20 * num
- if fruit and week_day:
- print(f"{total:.2f}")
- else:
- print("error")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement