The pseudo-code in Figure 1 assigns two string values to two variables - AQA - GCSE Computer Science - Question 2 - 2021 - Paper 1
Question 2
The pseudo-code in Figure 1 assigns two string values to two variables.
Figure 1
title - 'computer science'
level - 'gcse'
Shade one lozenge that shows the length ... show full transcript
Worked Solution & Example Answer:The pseudo-code in Figure 1 assigns two string values to two variables - AQA - GCSE Computer Science - Question 2 - 2021 - Paper 1
Step 1
Shade one lozenge that shows the length of the contents of the variable level in Figure 1.
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
The variable level has the string value 'gcse', which contains 4 characters. Therefore, you should shade the lozenge that corresponds to the length of 4.