Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- weight = float(input())
- service = input()
- distance = float(input())
- km_price = 0
- if weight < 1:
- km_price = 0.03
- elif 1 <= weight < 10:
- km_price = 0.05
- elif 10 <= weight < 40:
- km_price = 0.1
- elif 40 <= weight < 90:
- km_price = 0.15
- elif 90 <= weight < 150:
- km_price = 0.2
- express = 0
- if service == 'express':
- if weight < 1:
- express = km_price / 100 * 80
- elif 1 <= weight < 10:
- express = km_price / 100 * 40
- elif 10 <= weight < 40:
- express = km_price / 100 * 5
- elif 40 <= weight < 90:
- express = km_price / 100 * 2
- elif 90 <= weight < 150:
- express = km_price / 100
- total = km_price * distance + express * weight * distance
- print(f'The delivery of your shipment with weight of {weight:.3f} kg. would cost {total:.2f} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement