Please enable JavaScript.
Coggle requires JavaScript to display documents.
Excecute displayItem(), Option 5: Display Details of an Item - Coggle…
Excecute displayItem()
User inputs item code to get its details and assigns it to variable(code)
Set found to be false
With function: open 'inventory.txt' for reading
Is there another line to read?
YES
Strip and split the line to make it a list and assign it to a variable
Is the first element in the list(the item code) equal to variable(code)?
YES
Set found to be True
1 more item...
NO
NO
Is found not false?
YES
NO
Print 'item not found' error message
Return
Option 5: Display Details of an Item