State the final value of the variable valid in the algorithm below for each of the following initial values of the string record:
USD/100
EUR 50
USDT
prefix ← ''
i ← 0
WHILE record[i] ≠ '/' AND i < 4
prefix ← prefix + record[i]
i ← i + 1
ENDWHILE
valid ← False
IF prefix = 'USD' OR prefix = 'EUR' OR prefix = 'USDT' THEN
valid ← True
ENDIF
208 exam-style questions on AQA GCSE Computer Science Representing algorithms. Each one has a worked solution and a mark scheme showing where the marks go.