Question: n this assignment, you will write a function that will accept multiple pieces of information ( product name, product price, amount purchased ) and return

n this assignment, you will write a function that will accept multiple pieces of information (product name, product price, amount purchased) and return product totals and the total amount purchased.
The function will accept 6 pieces of information (product 1 name, product 1 price, product 1 amount purchased, product 2 name, product 2 price and product 2 amount purchased).
The function will need to calculate the total cost of each product.
The function also needs to calculate the total amount of the purchase.
Return a string containing products and total cost.
Call the function and retrieve the products and costs.
Echo your results.
It should look like this:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!