State what should be written in place of the labels L1, L2, and L3 in the algorithm below to successfully identify and output the item with the lowest stock level.
SUBROUTINE checkInventory(mode, totalItems)
inventory ← [['Tablet', 'Laptop', 'Router', 'Switch', 'Phone'],
['12', '4', '25', '8', '15']]
pos ← 0
low ← 9999
IF mode = 'LOWEST' THEN
FOR i ← 0 TO totalItems - 1
stock ← STRING_TO_INT(inventory[L1][i])
IF stock < low THEN
low ← stock
pos ← L2
ENDIF
ENDFOR
ELSE
OUTPUT 'not implemented'
ENDIF
IF low ≠ 9999 THEN
OUTPUT inventory[0][pos], ' has stock level: ', inventory[1][pos]
ENDIF
ENDSUBROUTINE
OUTPUT 'Search for HIGHEST or LOWEST stock? '
choice ← USERINPUT
checkInventory(L3, 5)
L1
L2
L3
131 exam-style questions on AQA GCSE Computer Science Structured programming and subroutines (procedures and functions). Each one has a worked solution and a mark scheme showing where the marks go.