State what should be written in place of the labels L1 to L3 in the algorithm in Figure 16 - AQA - GCSE Computer Science - Question 14 - 2023 - Paper 1
Question 14
State what should be written in place of the labels L1 to L3 in the algorithm in Figure 16.
Figure 16 shows an incomplete algorithm, represented using pseudo-code, ... show full transcript
Worked Solution & Example Answer:State what should be written in place of the labels L1 to L3 in the algorithm in Figure 16 - AQA - GCSE Computer Science - Question 14 - 2023 - Paper 1
Step 1
What should be written in place of L1
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
L1 should be replaced by 1; which initializes the votes counter.
Step 2
What should be written in place of L2
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
L2 should be replaced by i; which indicates the control variable for the loop.
Step 3
What should be written in place of L3
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
L3 should be replaced by method; which refers to the method of sorting the votes.