Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

make an inventory management system. There should be some sort of home menu with

ID: 3721260 • Letter: M

Question

make an inventory management system. There should be some sort of home menu with the title, "Watchmen Security Supply" This home menu should have 3 options. "Add to Inventory", "View Inventory", and "Produce Report" Adding to inventory when selected should let the user enter a product name, price and amount of product. This should be stored and saved for the current run of the program. View inventory should do exactly what it says. When selected it should display all current entered products. Produce report should display a total price amount of all products in the system and a total amount of all products in the system. in python

Explanation / Answer

# Hello World program in Python
  
no_of_products=0
details=[] // stores product details in the form [[name,price,amount],[name,price,amount] etc.]
ch=0
while(ch!=4):

ch=int(input("Watchmen Security Supply 1. Add to Inventory 2. View Inventory 3. Product Report 4. Exit "))

if(ch==1):
n=int(input("Enter number of items to add:"))
no_of_products+=n
for i in range(0,n): //read input for n products
name=input("Enter name:")
price=float(input("Enter price:"))
amount=float(input("Enter amount:"))
details.append([name,price,amount]) //add to inventory list

elif(ch==2):
print("Name Price Amount ")
for i in range(0,no_of_products): //print n product details
print(details[i][0]," ",details[i][1]," ",details[i][2]," ")
  
else:
total_price=0
total_amount=0
for i in range(0,no_of_products): //calculate total amount and price
total_price+=details[i][1]*details[i][2]
total_amount+=details[i][2]
print("Total price = ",total_price," Total Amount = ",total_amount)
  

Output:

Watchmen Security Supply

1. Add to Inventory

2. View Inventory

3. Product Report

4. Exit

1

Enter number of items to add:3

Enter name:product 1

Enter price:10.00

Enter amount:5

Enter name:product 2

Enter price:25.00

Enter amount:45

Enter name:product 3

Enter price:12.50

Enter amount:22

Watchmen Security Supply

1. Add to Inventory

2. View Inventory

3. Product Report

4. Exit

2

Name Price Amount

product 1 10.0 5.0

product 2 25.0 45.0

product 3 12.5 22.0

Watchmen Security Supply

1. Add to Inventory

2. View Inventory

3. Product Report

4. Exit

3

Total price = 1450.0

Total Amount = 72.0

Watchmen Security Supply

1. Add to Inventory

2. View Inventory

3. Product Report

4. Exit

4