Question: Provide a critique of the code in Appendix 1 in bullet points and explain how the code can be better written. Appendix 1 inventory =
Provide a critique of the code in Appendix 1 in bullet points and explain how the code can be better written.
Appendix 1
inventory = ['pen', 'pencil', 'ruler', 'eraser', 'marker'] print(f'This is the list of stationery inventory available {inventory}. Please enter any one of them.')
continue_query = 'yes' updated_inventory = []
while continue_query == 'yes' :
stationery = str(input("What is type of stationery to be updated? ")) qty = (input("What is current quantity? ")) price = (input("What is the current list price? "))
entered_input = [stationery,qty,price] updated_inventory.append(entered_input)
continue_query = str(input("Would you like to continue? (Indicate yes or no)"))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
