An algorithm is designed to simulate the vertical motion of a falling object under gravity using Euler's method with a time step of 0.1 s until it hits the ground. The pseudo-code for this algorithm is shown below:
1 t ← 0
2 y ← 100
3 v ← 0
4 dt ← 0.1
5 WHILE y > 0 DO
6 v ← v - 9.81 * dt
7 y ← y + v * dt
8 t ← t + dt
9 ENDWHILE
10 OUTPUT t
Which line number shows where iteration is first initiated in this algorithm?
Line 3
Line 4
Line 5
Line 6
298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.