Site icon Matistics

Python – write a program using if constructs to compute the NET AMOUNT to be paid by the customers

Purchase amountMill clothHandloom items
1-1005.0
101-2005.07.5
201-3007.510.0
>30010.015.0
 a = int(input("No of mill cloths:"))
b = int(input("No of hand loom items:"))
#rate of mill cloth = 500
#rate of handloom cloth = 600
amount = a*500 + b*600
if (amount<=100):
    bill = amount - 5*b
elif (amount>100 and amount<=200):
    bill = amount - 5*a - 7.5*b
elif (amount>200 and amount<=300):
    bill = amount - 7.5*a - 10*b
else:
    bill = amount - 10*a - 15*b
print(f"Total Amount : {amount}")
print(f"Total Amount after discount to be paid : Rs{bill}")
Exit mobile version