While purchasing certain items, a discount of 10% is offered if the quantity purchased is more than 10. If quantity and price per item are input through the keyboard, write a program to calculate the total expenses.
This program is written in the Python programming language and it is designed to calculate the total expenses of purchasing a certain quantity of items, based on the quantity purchased and the amount per item.
qty = int(input("Enter the Quantity Purchased :")) amt = float(input("Enter the Amount Per Item :")) if(qty>10): total = qty * amt; total = total- (total * 0.1) else: total = qty * amt print("Total Expenses is :",total)
Enter the Quantity Purchased :14 Enter the Amount Per Item :78 Total Expenses is : 982.8
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions