Skip to content

Commit ce95655

Browse files
committed
Removed Errors
1 parent 6b70fd6 commit ce95655

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

School_FinalOutput/Group1_Store.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ def editProduct(prod_id, prod_name=None, prod_price=None, prod_stock=None):
5858
S_Store.S_items[prod_id][0] = prod_name
5959

6060
if prod_price != None:
61-
S_Store.S_items[prod_id][1] = prod_price
61+
S_Store.S_items[prod_id][1] = int(prod_price)
6262

6363
if prod_stock != None:
64-
S_Store.S_items[prod_id][2] = prod_stock
64+
S_Store.S_items[prod_id][2] = int(prod_stock)
6565

6666

6767

@@ -291,10 +291,8 @@ def menu():
291291
if " " in prod_name:
292292
prod_name.replace(" ", "_")
293293

294-
prod_price = int(input("Product Price: "))
295-
296-
prod_stock = int(input("Product Stock: "))
297-
294+
prod_price = input("Product Price: ")
295+
prod_stock = input("Product Stock: ")
298296
edit = S_Store.editProduct(prod_id=prod_id, prod_name=prod_name, prod_price=prod_price, prod_stock=prod_stock)
299297
elif c == 11: # Exit
300298
Clearscreen()

0 commit comments

Comments
 (0)