Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a. Pretend that the function diff does not exist. Implement the function on your own in a script file. Make the solution generic for any

a. Pretend that the function diff does not exist. Implement the function on your own in a script file. Make the solution generic for any input vector.

b. You own a computer store that sells laptops of various brands. You are considering giving a 10% discount on the current prices. However, you are worried that if you give the discount you will lose in terms of revenue. You asked a forecasting firm to predict the next months sales (in quantity) with and without the discount. Using the data below, compute the revenues with and without a discount, and decide if you will proceed with the discount. You must use vector and/or matrix operations in the solution.

The script should print the revenue before & after and print a Boolean true (1) or false (0) for whether you will give a discount or not that will be computed for the specific input. You may solve for the specific example below. Here is the data you need for the analysis:

Prices:

Brand

Price Before Discount

P&H

1000

CAM

1200

LLED

1100

Microhard

1400

Forecasted quantities:

Brand

Quantities before Discount

Quantities after Discount

P&H

50

55

CAM

100

110

LLED

120

125

Microhard

30

50

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions

Question

Prepare a statement of income and expenses.

Answered: 1 week ago