Partial preview of the text
Download . Actual 2024 AQA GCSE COMPUTER SCIENCE 8525/1C Paper 1 Merged Question Paper + Mark Schem and more Exams Computer Science in PDF only on Docsity!
Actual 2024 AQA GCSE COMPUTER SCIENCE 8525/1C Paper 1 Merged Question Paper + Mark Scheme AQA= Please write clearly in block capitals. Centre number Candidate number Surname Forename(s) Candidate signature | declare this is my own work. GCSE COMPUTER SCIENCE Paper 1 Computational thinking and programming skills - VB.NET Wednesday 15 May 2024 Afternoon Time allowed: 2 hours Materials ¢ There are no additional materials required for this paper. ahds For Examiner's Use e You must not use a calculator. 4. Ul) - Question Mark Instructions = 1 e Use black ink or black ball-point pen. Use pencil only for drawing. e Answer all questions. 28 e You must answer the questions in the spaces provided. 4-5 e If you need extra space for your answer(s), use the lined pages at the end of 67 this book. Write the question number against your answer(s). e Do all rough work in this book. Cross through any work you do not want a8 to be marked. 10-11 e Questions that require a coded solution must be answered in VB.NET. I 42 e You should assume that all indexing in code starts at 0 unless stated otherwise. ad Information 18 The total number of marks available for this paper is 90. TOTAL Advice For the multiple-choice questions, completely fill in the lozenge alongside the appropriate answer. CORRECT METHOD [e| WRONG METHODS If you want to change your answer you must cross out your original answer as shown. 4 If you wish to return to an answer previously crossed out, ring the answer you now wish to select as shown. J LL Answer all questions. 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. Figure 1 film € "Godzilla vs. Kong" year © 2021 OUTPUT "Please guess a letter" letter © USERINPUT [o[1].[4] Which pseudo-code statement assigns the length of the string £i 1m to a variable called value? Shade one lozenge. [1 mark] A film € LEN (value) B film € film + value C value € film bb) bb) D value € LEN(film) [o[1].[2] The POSITION subroutine returns the position of the first occurrence of a character 02 in a string. For example: ¢ POSITION("Godzilla vs. Kong", "o"™) would return 1 * POSITION("Godzilla vs. Kong", "z") would return 3 letter and filmare variables used in the algorithm in Figure 1. Complete the pseudo-code statement to find the position of the first occurrence of the contents of letter in filmand store this position in the variable location You must use the POSITION subroutine in your answer. [1 mark] location © IB/G/Jun24/8525/1C. Do not write outside the box Do not write [o[1].[5| Write a VB.NET program that: ono ¢ gets the user to enter the name of a film e displays You entered followed by the name of the film entered by the user. The output from the program must be on one line. You should use meaningful variable name(s) and VB.NET syntax in your answer. The answer grid below contains vertical lines to help you indent your code accurately. [2 marks] 04 IB/G/Jun24/8525/1C. 4 Do not write outside the Turn over for the next question ‘box DO NOT WRITE/ON THIS PAGE ANSWER IN THE/SPACES PROVIDED Turn over > INN IB/G/Jun24/8525/1C 5 Do not write [2] In the algorithm in Figure 2, what will be the output when the user input is 5? oot ne Shade one lozenge. [1 mark] A Almost [e] B False [e] Cc True fe] D Unknown [e] [o[2].[3] Which value input by the user would result in True being output by the algorithm in Figure 2? Shade one lozenge. [1 mark] bb) bb) [o|2].[4} Rewrite line 2 from the algorithm in Figure 2 without using the NOT operator. The algorithm must still have the same functionality. [1 mark] [o[2].[5| A user inputs a value into the algorithm in Figure 2. State one value that the user could input that would result in an output of Unknown [1 mark] Turn over > 07 IB/G/Jun24/8525/1C 7 Do not write outside the Figure 3 shows an incomplete VB.NET program for a number guessing game. box e Line numbers are included but are not part of the program. Figure 3 1 Dim rGen As New Random() 2 Dim randomNumber As Integer 3 4 Console.WriteLine ("Enter a number") 5 Dim userNumber As Integer = Console.ReadLine() 6 While userNumber < 1 Or userNumber > 100 7 Console.WriteLine("Invalid number") 8 userNumber = Console.ReadLine() 9 End While 10 Console.WriteLine ("Valid number entered") 11 If randomNumber = userNumber Then 12 Console.WriteLine("Number guessed correctly") 13 End If [o[3].[4] The program should generate a random number between 1 and 100 (including 1 and 08 100). This will be the number the user has to guess. Write the VB.NET code that should be used on line 3 in Figure 3 to: © generate a random number between 1 and 100 inclusive ¢ assign this number to the appropriate variable from the program. You must use rGen.Next (a, b) in your VB.NET code. rGen.Next (a, b) generates a random integer in the range a to b starting at a but finishing one before b [2 marks] IB/G/Jun24/8525/1C. 8 10 Do not write . outside the [1] Define the term abstraction. box. [1 mark] [0[4].[2] State the name for the process of breaking a problem down into sub-problems. [1 mark] INIA IBG/Jun24/8525/1C 10 11 Figure 4 shows an algorithm, represented using pseudo-code. The algorithm calculates the total cost of hiring a hotel for a wedding. Figure 4 numberOfGuests © USERINPUT numberOfRooms © USERINPUT charge © 25 IF numberOfGuests > 50 THEN totalCost © numberOfGuests * 2 ELSE IF numberOfGuests 2 25 THEN totalCost © numberOfGuests * 4 ELSE totalCost © numberOfGuests * 5 ENDIF ENDIF totalCost © totalCost + IF totalCost < 1400 THEN totalCost € totalCost + charge ENDIF OUTPUT totalCost Complete the table below using the algorithm in Figure 4. (numberOfRooms * 100) Do not write outside the box [3 marks] Input value for Input value for Output numberOfGuests | numberOfRooms 50 30 20 10 500 5 11 Turn over > IB/G/Jun24/8525/1C 11 13 Turn over for the next question 13 Turn over > IB/G/Jun24/8525/1C Do not write outside the box 13 14 Do not write outside the A shop owner wants to create stock codes for each type of sweet they sell. box Figure 5 shows some of the sweets. Figure 5 sweetID sweetName brand sl WINE GUMS MAYNARDS S2 COLA CUBES BERRYMANS S3 STARBURST WRIGLEY A stock code is made up of the: e sweetID ¢ first letter and the second letter in sweetName ¢ first letter of the brand For example: « the stock code for WINE GUMS would be S1WIM « the stock code for STARBURST would be S3STW Write a VB.NET program to create the stock code for a sweet. The program should: ¢ get the user to enter the sweet ID, sweetName and brand * create the stock code ¢ assign the stock code to a variable called code You should use meaningful variable name(s) and VB.NET syntax in your answer. The answer grid below contains vertical lines to help you indent your code. [4 marks] 14 IBG/Jun24/8525/1C. 14 16 Do not write outside the Figure 6 shows an algorithm, represented using pseudo-code. box Figure 6 days € [10, 15, 4] sales € [20, 33, 12] weeks © [0, 0, 0] FOR i € 0 TO 2 daysTotal € days[i] + sales[il] weeks[i] © daysTotal DIV 7 ENDFOR weeksTotal © weeks[0] + weeks[1] + weeks[2] OUTPUT weeksTotal The DIV operator is used for integer division. 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 all the rows in the table. [6 marks] weeks i daysTotal weeksTotal (0] | [1] | [2] 16 IBG/Jun24/8525/1C. 16 17 Do not write outside the [1] Which of the following best describes a data structure? box Shade one lozenge. [1 mark] A Anumber with a fractional part B_ Avalue such as a whole number C_Allof the data used and stored within a program D_ Anorganised collection of values Question 9 continues on the next page Turn over > INIA IB/GiJun24/8525/1C 17 19 Do not write outside the [o[9].[3| Write an algorithm using pseudo-code to display the name of the most expensive box book. The algorithm should: © compare the price of B1 and the price of B2 ¢ output the book name of the most expensive book ¢ output Neither if the books are the same price. The algorithm should work for any values stored in B1 and B2 [3 marks] Turn over for the next question Turn over > 9 IB/G/Jun24/8525/1C 19 1 20 Do not write outside the Figure 8 shows a VB.NET program. box Figure 8 Sub First(pl As Integer, p2 As Integer, p3 As Integer) Dim vl As Integer = p2 + p3 Console.WriteLine(Second(v1l, pl) End Sub Function Second(pl As Integer, p2 As Integer) As Integer Dim vl As Integer = pl + p2 If vl > 12 Then vl = vl + Third(p1) End If Return vl End Function Function Third(pl As Integer) As Integer If pl > 3 Then Return 2 Else Return 0 End If End Function [1[0].[1] State what will be displayed by the Console.WriteLine statement when the subroutine First is called with the values 3, 4 and 4 for the parameters p1, p2 and p3 [1 mark] [1[0].[2] State what will be displayed by the Console.WriteLine statement when the subroutine First is called with the values 3, 4 and 8 for the parameters p1, p2 and p3 [1 mark] 20 IBG/Jun24/8525/1C. 20