Calculate the Discount & Grand Total in shopping bill by the given criteria in python

Calculate the Discount & Grand Total in shopping bill by the given criteria
Rs.1 to Rs.1000 - 0% Discount
Rs.1001 to Rs.3000 - 10% Discount
Rs.3001 to Rs.5000 - 20% Discount
More than Rs. 5000 - 30% Discount

qt=int(input(“Enter the quantity : “))
rt=int(input(“Enter the rate : “))
tot=qt*rt
    dis=0
if tot>=1 and tot<=1000:
    dis=0
elif tot>=1001 and tot<=3000:
    dis=10
elif tot>=3001 and tot<=5000:
    dis=20
elif tot>=5001:
    dis=30
print(“Total=”,tot)
print(“Discount=”,dis,”%”)
print(“Grand Total=”,tot-dis)

Output

Enter 12 percentage : 70
Enter entrance exam marks : 90

Your percentage is less than 80

Leave a Comment

Your email address will not be published. Required fields are marked *