#write a function total_price that has two parameters, list of prices and tax #function returns total price based on the following discount rule: #prices <=100 got 10% discount, prices>100 got 15% discount #tax applied AFTER discount #write a function random_list_float(size, min, max) that generates list of #size floating point numbers between min and max and returns the list #write main that fist generates size of list, then calls function #random_list_float to generate the list of prices, assuming prices are between #75 and 125. Use function total_price to find the total #example: 4 prices: 99.99 101 76.99 124.99, tax=7% #find total price import random def random_list_float(size, min, max): my_list=[] for i in range(size): my_list.append(random.uniform(min, max)) return my_list def total_price(my_list, tax): total=0 discounted=[] for i in range(len(my_list)): if(my_list[i]<=100): total=total+my_list[i]*0.9 discounted.append(my_list[i]*0.9) else: total=total+my_list[i]*0.85 discounted.append(my_list[i]*0.85) print("discounted list") print(discounted) return total*(1+tax/100) def main(): size=random.randint(5,7) tax=random.randint(0,9) print("tax=", tax) print("size=", size) prices=random_list_float(size, 75,125) print("original prices are") print(prices) final_price=total_price(prices,tax) print("final_price", format(final_price, ".2f")) main()