Write a python program that takes the weight of luggage from the user and prints the total amount the user needs to pay according to the given conditions:
Sample Input - Sample Output
Luggage Weight: 5 Payment: Tk. 200.25
Luggage Weight: 20 Payment: Tk. 701.0
Luggage Weight: 32 Weight crosses maximum limit
weight = int(input())
amount = 0
if weight > 30:
print('Weight crosses maximum limit')
exit()
if weight <= 10:
amount = 200
else:
amount = 200
difference = weight - 10
amount += difference * 50
amount += 5 * weight / 100
print(amount)
Comments
Leave a comment