Question 1

AQA Computer Science June 2023 Paper 1C (8525/1C)GCSE6 marks

On the specification

1.1
3.1 Fundamentals of algorithms
1.2
3.2 Programming
1.3
3.2 Programming
1.4
3.2 Programming
1.5
3.2 Programming
Question text

1 Figure 1 shows an algorithm, represented using pseudo-code, which assigns a different value to four variables. Figure 1 country  'United States of America' state  'California' city  'San Francisco' landmark  'Alcatraz Island' 1.1 Define the term algorithm. [2 marks] 1.2 The variable x is assigned a value using the statement: x  LEN(state) Using Figure 1, what is the value of x? Shade one lozenge. [1 mark] A 1 B 5 C 10 D 12 1.3 What is the result of concatenating the contents of the variables city and box landmark in Figure 1? Shade one lozenge. [1 mark] A San Francisco Alcatraz Island B San Francisco,Alcatraz Island C San Francisco, Alcatraz Island D San FranciscoAlcatraz Island 1.4 The subroutine SUBSTRING extracts characters from a given string. For example, SUBSTRING(3, 5, 'Computing') would return put The variable y is assigned a value using the statement: y  SUBSTRING(4, 7, landmark) Using Figure 1, what is the value of y? Shade one lozenge. [1 mark] A Alca B Atra C land D traz Figure 1 has been included again below. Figure 1 country  'United States of America' state  'California' city  'San Francisco' landmark  'Alcatraz Island' 1.5 The subroutine POSITION finds the first position of a character in a string. For example, POSITION('Computing', 'p') would return 3 The variable z is assigned a value using the statement: z  POSITION(landmark, 't') Using Figure 1, what value is assigned to z? Shade one lozenge. [1 mark] A –1 B 3 C 4 D 5 6