#In this program you will find a total price of the purchase based on the following #rule: items priced 100 dollars and below receive 15% discount. All other items receive 25% #discount. Write a program that first reads one integer - the number of items user #purchased in the store. The program then reads the price for each item. The program #finds the total purchase price based on the rule above. In addition, the program finds #the number of items that received 15% discount, the number of items that received 25% #discount, and the average price per item. #using loop for size=int(input("enter number of items you bought ")) count_15=0 count_25=0 total=0 if(size>0): i=1 while(i<=size): print("enter price for item", i) price=float(input("enter price ")) if(price<=100): discount=15 count_15+=1 #same as count_15=count_15+1 else: discount=25 count_25+=1 #same as count_25=count_25+1 final_price=price-price*discount/100 print("final price for item",i,"is", final_price) total=total+final_price i=i+1 print("total", total) print("average", total/size) print("number of items who received 15% discount", count_15) print("number of items who received 25% discount", count_25) else: print("invalid input")