Question: num _ in _ stock and num _ ordered are read from input. inventory _ estimate ( ) has two parameters stocked and num _
numinstock and numordered are read from input. inventoryestimate has two parameters stocked and numtobuy, and outputs the sum of stocked and numtobuy. Call inventoryestimate to output the sum of numinstock and numordered without modifying numinstock.
Click here for exampleEx: If the input is:
then the output is:
Predicted stock:
Currently in stock: numinstock and numordered are read from input. inventoryestimate has two parameters stocked and numtobuy, and outputs the sum of stocked and numtobuy. Call inventoryestimate to output the sum of numinstock and numordered without modifying numinstock.
cdot Click here for example
Ex: If the input is:
then the output is:
Predicted stock:
Currently in stock:
def inventoryestimatestocked numtobuy:
printfPredicted stock: stocked numtobuy
numinstock intinput
numordered intinput
printfCurrently in stock: numinstock
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
