Question: Cmpt 1 0 1 Program 1 : Warehouse Inventory ( 2 5 marks ) a ) Write a program to create a warehouse inventory shipping
Cmpt
Program : Warehouse Inventory 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:
warehouseactivities inventory:
showinventoryinventory
shipments placeordersinventory
displak changes inventory shipments
calcnetchargeshipments
warehouseactivities, 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:
showinventoryinventory:
Print the inventory displaying each entry in the inventory list with its list
position. Refer to the screenshot for format details.
placeorders inventory
Create a list of randomly generated integers to represent the orders made. Each randomly generated number will be between a times the amount of inventory items in the inventory list to b 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
displaychangesinventory 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.
calcnetchangeshipments:
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.
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
