AQA · GCSE · Computer Science · Higher
Finding string length in pseudo-code
Figure 1 shows an algorithm, represented using pseudo-code. The algorithm assigns different values to two variables, then asks the user to input a letter.
| film ← "Godzilla vs. Kong" |
| year ← 2021 |
| OUTPUT "Please guess a letter" |
| letter ← USERINPUT |
Which pseudo-code statement assigns the length of the string film to a variable called value? Shade one lozenge.
Write your answer first. You can study the marking guidance whenever you need it.
Study the marking See what earns credit and compare it with a full-mark answer.
Marking points
- 1 Selects the statement that stores LEN(film) in value.