Question: Cmpt 1 0 1 Program 1 : Warehouse Inventory ( 2 5 marks ) a ) Write a program to create a warehouse inventory shipping

Cmpt 101
Program 1: Warehouse Inventory (25 marks)
a) Write a program to create a warehouse inventory shipping summary. This will involve
displaying the initial inventory, generating inbound and outgoing shipment amounts,
displaying the changes, and then determining the net change of crates in the inventory.
Assume the inventory will always consist of at least one item. Here are the criteria:
The main function in your program must be named: warebrarseactivities. It has been provided for you. Copy this function into your program EXACTLY as written:
warehouse_activities (inventory):
show_inventory(inventory).
shipments = place-orders(inventory)
displak changes (inventory, shipments)
calc_netcharge(shipments)
warehous_eactivities, calls FOUR different helper functions. As you write
your program, test each function individually with different function calls. Only move on to the next function once you are certain that your current function works.
Here are the helper function specifications:
showinventory(inventory):
Print the inventory displaying each entry in the inventory list with its list
position. Refer to the screenshot for format details.
place_orders (inventory)
Create a list of randomly generated integers to represent the orders made. Each randomly generated number will be between (a)-3 times the amount of inventory items in the inventory list to (b)3 times the amount of inventory items in the inventory list. Negative numbers will represent outgoing orders and positive will represent inbound orders. For this, you must use import random and random. randipt appropriately. Print the list before returning it.
display_changes(inventory, shpments):
Print the inventory changes showing each item from the inventory list with its corresponding order number from the shipments list. Negative numbers represent outgoing orders, and positive (or zero) represent inbound. Refer to the screenshot for format details.
calc_net_change(shipments):
Calculate the net change of crates in the warehouse. Display this number. Refer to the screenshot for details.
The sample output provided shows you two example runs. Your output should be similar but reflect the inventory items provided and the randomly selected order numbers generated by your program.
Cmpt 1 0 1 Program 1 : Warehouse Inventory ( 2 5

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!