Question: The sheet Inventory lists a grocery store s inventory for two months. Calculate the percent change for each item to two decimal places. If the
The sheet Inventory lists a grocery stores inventory for two months. Calculate the percent change for
each item to two decimal places. If the formula gives an error, put "Initial Stock" in the cell. Note that
when old contains a zero then the formula results in a division by zero.
Your solution must have the important property that when we add new products to the inventory, then
the output will correctly update.
Write a simple specification such as:
INPUT: old, an array of numbers.
new, an array of numbers and
errortext defining a string. old and new have the same number of cells.
OUTPUT: The percent change given by the formula newoldold When this fraction is not defined,
output the string errortext. The formula looks like LAMBDAoldnew,errortext, An example for
the actual argument for errortext is "Initial Stock".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
