rite a Python program to perform the below To input the Student name To input the price of 5 items Find the Total price of items Input the Total Amount. Check, If the Total Amount is less than Total price of items, print “The Amount is lesser", otherwise Calculate the Balance Amount. (Balance Amount = Total Amount - Total price of items). Display the Bill as shown in the below format . AL - Musannah Super Market Bill Student Name: Mohammed Total price of Items: 150 Total Amount: 500 Balance Amount: 350 Thank you Visit again
Answers
Answered by
11
name = input("Enter your name:")
pr1 = float(input("Enter the price of the first item:"))
pr2 = float(input("Enter the price of the second item:"))
pr3 = float(input("Enter the price of the third item:"))
pr4 = float(input("Enter the price of the fourth item:"))
pr5 = float(input("Enter the price of the fifth item:"))
tot = float(input("Enter the total amount:"))
total = pr1 + pr2 + pr3 + pr4 + pr5
print("Al - Musannah Super Market")
print("Bill student name:", name)
print("Total price of items:", total)
print("Total amount", tot)
print("Balance amount:", bal)
print("Thank you! Visit again!")
Attachments:
Similar questions