Question: num _ in _ stock and num _ ordered are read from input. inventory _ estimate ( ) has two parameters stocked and num _

num_in_stock and num_ordered are read from input. inventory_estimate() has two parameters stocked and num_to_buy, and outputs the sum of stocked and num_to_buy. Call inventory_estimate() to output the sum of num_in_stock and num_ordered without modifying num_in_stock.
Click here for exampleEx: If the input is:
93
66
then the output is:
Predicted stock: 159
Currently in stock: 93 num_in_stock and num_ordered are read from input. inventory_estimate() has two parameters stocked and num_to_buy, and outputs the sum of stocked and num_to_buy. Call inventory_estimate() to output the sum of num_in_stock and num_ordered without modifying num_in_stock.
\(\cdot \) Click here for example
Ex: If the input is:
93
66
then the output is:
Predicted stock: 159
Currently in stock: 93
```
def inventory_estimate(stocked, num_to_buy):
print(f'Predicted stock: {stocked + num_to_buy}')
num_in_stock = int(input())
num_ordered = int(input())
6
7
8
9
10
11 print(f'Currently in stock: {num_in_stock}')
```
num _ in _ stock and num _ ordered are read from

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