#write a function is_enough that has two parameters: money and #cost. Money - is a amount of money you currently have #cost - is the total cost of your purchase #Function returns 1 if you have enough money to pay #and 0 otherwise #write a function total that reads a sequence of positive #values - prices of the items customer wants to purchase #function returns total cost of the purchase #write main that reads number of customers #and the amount of money each customer has #call function total to find total cost of the purchase #and then call function is_enough to find if the customer has #sufficient amount of money #program prints appropriate message and counts #the number of customers who could proceed with the purchase #and the number of customers who doesn't have enougg money def is_enough(money, cost): if(money>=cost): return 1 else: return 0 def total(): price=float(input("enter positive price ")) sum_price=0 while(price>0): sum_price=sum_price+price price=float(input("enter positive price ")) return sum_price def main(): num=int(input("enter number of customers ")) c_enough=0 c_not=0 for i in range(num): money=float(input("enter how much money you have ")) total_price=total() print("total price of purchase for customer",i+1,"is",total_price) if(is_enough(money,total_price)==1): print("you have enough money") c_enough=c_enough+1 else: print("no enough money") c_not=c_not+1 print("c_enough", c_enough) print("c_not", c_not) main()