WRITE A PYTHON PROGRAM TO CALCULATE THE BILL AMOUNT FOR AN ITEM GIVEN ITS QUANTITY SOLD, VALUE, DISCOUNT, AND TAX.
PROGRAM:
a=float(input("Enter the quantity of the items:"))
b=int(input("Enter the value of items sold:"))
c=int(input("Enter the discount value of an item in %:"))
d=int(input("Enter the tax value of an item:"))
amount=a*b
discount=amount-(amount*(c/100))
tax=discount+d
tot=tax
print("**************BILL*******************************")
print("Quantity of the items: ",a)
print("Rate of one item: ",b)
print("-------------------------------------------------")
print("Amount: ",amount)
print("Discount: -",c,"%")
print("Discount amount: ",discount)
print("Tax: +",d)
print("-------------------------------------------------")
print("Bill amount: Rs. ",tot)
OUTPUT:
No comments:
Post a Comment