AQA · GCSE · Computer Science
Paper 1A Computational thinking and programming skills (C#)
01.1 · 1 mark Finding string length in pseudo-code Which pseudo-code statement assigns the length of the string film to a variable called value? Shade one lozenge. 01.2 · 1 mark Finding substring position in pseudo-code Complete the pseudo-code statement to find the position of the first occurrence of the contents of letter in film and store this... 01.3 · 1 mark Choosing a data type for year Which of the following would be the most suitable data type for the variable year? Shade one lozenge. 01.4 · 1 mark Meaning of an assignment statement Describe what is meant by an assignment statement in a program. 01.5 · 2 marks C# user input and output Write a C# program that gets the user to enter the name of a film and displays You entered followed by the name of the film... 02.1 · 1 mark Relational operators in an algorithm Where is a relational operator first used in the algorithm in Figure 2? Shade one lozenge. 02.2 · 1 mark Tracing algorithm output for input 5 In the algorithm in Figure 2, what will be the output when the user input is 5? Shade one lozenge. 02.3 · 1 mark Algorithm inputs producing True Which value input by the user would result in True being output by the algorithm in Figure 2? Shade one lozenge. 02.4 · 1 mark Rewriting a condition without NOT Rewrite line 2 from the algorithm in Figure 2 without using the NOT operator. The algorithm must still have the same functionality. 03.1 · 2 marks Generating a bounded random number in C# Write the C# code that should be used on line 3 in Figure 3 to generate a random number between 1 and 100 inclusive and assign... 03.2 · 2 marks Boundary testing integer validation Complete the test plan in Table 1 to test the validation of userNumber in the program in Figure 3. 03.3 · 2 marks Identifying syntax and logic errors In an earlier version of the program in Figure 3, line 6 contained one syntax error and one logic error. Complete the table to... 04.1 · 1 mark Meaning of abstraction Define the term abstraction. 04.2 · 1 mark Decomposing problems into sub-problems State the name for the process of breaking a problem down into sub-problems. 05.0 · 3 marks Tracing an algorithm table Complete the table using the algorithm in Figure 4. 06.0 · 7 marks C# conditional mark calculation Write a C# program to calculate a student's total mark for three essays, applying the stated late-submission reductions... 07.0 · 4 marks Constructing a string stock code Write a C# program to get sweetID, sweetName and brand from the user, create the specified stock code, and assign it to a... 08.0 · 6 marks Tracing array totals through iteration Complete the trace table for the algorithm in Figure 6. Part of the table has already been filled in. You may not need to use... 09.1 · 1 mark Meaning of a data structure Which of the following best describes a data structure? Shade one lozenge. 09.2 · 3 marks Completing a pseudo-code record algorithm Complete the incomplete record algorithm by filling in its four gaps using the items in Table 2. You may use some items more... 09.3 · 3 marks Comparing record prices in pseudo-code Write an algorithm using pseudo-code to display the name of the most expensive book, comparing B1 and B2, and output Neither if... 10.1 · 1 mark Tracing nested subroutine calls State what will be displayed by Console.WriteLine when First is called with 3, 4 and 4 for p1, p2 and p3. 11.0 · 7 marks Looping credential authentication in C# Write a C# program to authenticate a username and password, displaying Access denied for an invalid pair, Access granted for a... 12.1 · 2 marks Updating a sliding-puzzle board Complete the board to show the new positions of the tiles after the program in Figure 14 is run on the board in Figure 15.