Question: i ' m not sure what is causing the issue here. this assignment is due early tomorrow morning so any and all help is appreciated
im not sure what is causing the issue here. this assignment is due early tomorrow morning so any and all help is appreciated :
def updatequantityinventory itemlist, quantitylist:
for i in rangelenitemlist:
item itemlisti
quantity quantitylisti
if item in inventory:
index inventory.indexitem
inventoryindex quantity
else:
inventory.appenditemlist
inventory.appendquantitylist
return inventory
Traceback most recent call last:
File UserstrippydoodaDownloadstesterpy line in testupdatequantity
First list contains additional elements.
First extra element :
'Apple'
Orange 'Bread', 'Banana', 'Milk', 'Apple',
Orange 'Bread', 'Banana', 'Milk',
FAIL: testupdatequantitymainAllTests.testupdatequantity
Traceback most recent call last:
File UserstrippydoodaDownloadstesterpy line in testupdatequantity
self.assertEqualupdatequantitylstApple'Milk','Bread', 'Banana','Orange'Orange 'Bread', 'Banana',
AssertionError: Lists differ: Orange 'Bread', 'Banana', 'Apple', 'Milk', Orange 'Bread', 'Banana',
First list contains additional elements.
First extra element :
'Apple'
Orange 'Bread', 'Banana', 'Apple', 'Milk',
Orange 'Bread', 'Banana',
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
