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