Write a function total_cost that has two parameters, the number of items person would like to purchase and the original price of the item. The function finds and returns the total cost of the purchase taking in account 15% discount if applicable.
Write a program that reads an original price of the item and the number of items purchased by 3 different people (you will have 4 INPUT values in this case). The program finds and prints the total cost for each person and the average cost of the item.
Example: Item price=10 dollars, number or items purchased: user1=10, user2=5, user3=15
Output: user1 total is 85 dollars, user2 total is 50 dollars, user3 total is 127.5 dollars.
The average price of the item is: 8.75