Question: please I need help with this practise question 03. 2) Please help a grocery store to calculate their sales amount. Let vector Price contains the

please I need help with this practise question

03.\" 2) Please help a grocery store to calculate their sales amount. Let vector "Price" contains the products' unite price, vector "count" contains the sales volume of each product (how many pieces each product was sold), vector "cost" contains the unit cost of each product. For example, price = [1.99, 2.89, 11.89, 15.49, . . .] count = [15,29, 17,35, . . .] cost = [0.99, 1.5,8, 10,. . .] That is, product 1 was sold 15 pieces. and the unit price is $1.99. unit cost is $0.99. product 2 was sold 29 pieces, and the unit price is $2.89, unit cost is $1.5. product 3 was sold 17 pieces. and the unit price is $11.89, unit cost is $8. product 4 was sold 35 pieces. and the unit price is $15.49, unit cost is $16. Assume the length of all three vectors are same but unknown. 1.(2) Code to calculate the unit profit of each product (i.e. unit price - unit cost), save to vector "profit". 2.(4) Code to calculate the total profit for all products based on the sale volumes. That is, (1 .99-0.99)15 + (2.89-1.5j29 + (11.89-8)17 + (15.49- 10)35+.... 3.(2) During a holiday promotion, the store offers 10% discount for each product. Code to calculate the unit profit after discount for all products, and save to new vector "profitDisct". 4.(2) With the price discount, it found that the sale volume for each product increased by 15%. Code to calculate the sale volume after discount for all products, and save to vector "countDisc ". 5.(2) Following 3, 4, code to calculate the total profit of all products during the promotion

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 Mathematics Questions!