#Write a function shopping that has one parameter - the number of items one person #purchased in the store. The function using the following rule: items priced a 100 #dollars and below receive 15% discount. All other items receive 25% discount. #Function finds and returns the number of items received 15% discount, the number of items #received 25% discount and total purchase price. Write main that reads the number of #people that came to the store. For each person, the program reads the number of items #purchased. The program finds total price, number of items with 15% discount and #number of items with 25% discount for each person and average price per person. def shopping(num_items): #taking care of ONE person disc15=0 disc25=0 total=0 for i in range(num_items): price=float(input("price? ")) if(price>100): disc25+=1 #disc25=disc25+1 discount=25 else: disc15+=1 discount=15 after_discount=price-price*discount/100 total = total+after_discount return disc15, disc25, total def main(): num_people=int(input("enter number of people ")) total_all=0 for i in range(num_people): num_items=int(input("how many items did you buy ")) disc15, disc25, total = shopping(num_items) print("person", i+1, "got", disc15, "items with 15% discount") print(disc25, "items with 25% discount") print("and paid", total) total_all+=total average=total_all/num_people print("average per person is", average) main()