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