#Mini Quiz 4 with functions #Write a function total that has 4 parameters: #number of pounds (integer), price per pound (float), #tax (integer), and additional integer, tax_indicator #Write a program that finds total purchase for 2 #customers def main(): #processing first customer pounds=int(input("enter number of pounds ")) price=float(input("price per pound ")) tax=int(input("Tax as integer ")) tax_indicator= int(input("1 - Taxable 0 - Not taxable ")) valid=pounds>0 and price>0 and tax>=0 valid_indicator=tax_indicator ==1 or tax_indicator==0 valid_input=valid and valid_indicator #Function CALL if(valid_input): total_customer1=total(pounds, price, tax, tax_indicator) print("customer 1 pay ", total_customer1) else: print("INPUT NOT VALID") #processing second customer pounds=int(input("enter number of pounds ")) price=float(input("price per pound ")) tax=int(input("Tax as integer ")) tax_indicator= int(input("1 - Taxable 0 - Not taxable ")) #Function CALL total_customer2=total(pounds, price, tax, tax_indicator) print("customer 2 pay ", total_customer2) def total(pounds, price, tax, tax_indicator): if(pounds<=5): discount=0 elif(pounds<=10): discount = 10/100 else: discount = 20/100 total=pounds*price*(1-discount)*(1+tax*tax_indicator/100) return total main()