#All perishable items in the store have EVEN barcodes. Write a program that #first reads the number of items in the store. The, the program reads the #barcode (integer number) for each item and its price (floating number). #The program finds the number of PERISHABLE items that cost under 2 dollars and #their average price. In addition, the program finds the number of #PERISHABLE items in the store and the number of NON-PERISHABLE items in #the store. #Solution 1 Using Loop for size=int(input("number of items in the store ")) total_under2=0 count_per_under2=0 count_per=0 count_nonper=0 for i in range(size): barcode=int(input("enter barcode ")) price=float(input("enter price ")) if(barcode%2==0):#this checks that barcode is an even number count_per=count_per+1 if(price<2): total_under2=total_under2+price count_per_under2=count_per_under2+1 else: count_nonper=count_nonper+1 print("# of perishables", count_per) print("# of non-perishable", count_nonper) if(count_per_under2>0): print(count_per_under2, "perishable under 2 dollars") print("their average", total_under2/count_per_under2) else: print("no perishable items under 2 dollars")