#In this program you will find a total price of the purchase based on the #following rule: items priced a 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. Assume the input is valid. #function total_price has one parameter- number of items, return total price #after discounts are taken def total_price(num_items): counter=0 total=0 while(counter100): discount=25 else: discount=15 new_price=price-price*discount/100 total=total+new_price counter=counter+1 return total def main(): num_items=int(input("how many items you purchased? ")) result = total_price(num_items) print("total after discounts is", result) main()