#Version 2 num=int(input("enter number of people ")) total=0 c0=0 c10=0 c20=0 total_discount=0 if(num>0): for i in range(num): pounds=int(input("enter number of pounds ")) price=float(input("price per pound ")) if(pounds<=5): total=total+pounds*price c0=c0+1 discount=0 elif(pounds<=10): total=total+(pounds*price - pounds*price*10/100) c10=c10+1 discount=10 else: total=total+(pounds*price - pounds*price*20/100) c20=c20+1 discount=20 total_discount=total_discount+discount print("total price", total) print("average discount", total_discount/num) print(c0,"didnt get any discount") print(c10,"got 10%") print(c20,"got 20%") else: print("no people came to the store today")