#functions #all functions will have name, parameters (some function might not have #parameters - empty list, for example main, doesn't have any parameters #functions can return values #but some function doesn't return any values, for example, main #write a function final_price that has two parameters #original price and tax (as an integer). Function returns the final price #after tax is applied #write a program (main) that first reads the number of people came to the #store. For each person, the program reads price and tax #and finds the final price for each person and the total price for all #customers def final_price(price, tax): #price and tax are FORMAL PARAMETERS - placeholders final=price+price*tax/100 return final #different way to write it: #return (price+price*tax/100) def main(): num=int(input("enter number of customers ")) total=0 if(num>0): for i in range(num): price=float(input("enter price ")) tax=int(input("enter tax as an integer ")) result=final_price(price, tax) #function call print("person",i+1,"paid", result) total=total+result print("total", total) else: print("nobody came to the store today") main()