Partial preview of the text
Download AQA GCSE COMPUTER SCIENCE Paper 1 Computational thinking and programming skills – Python 2 and more Exams Medicine in PDF only on Docsity!
AQA GCSE COMPUTER SCIENCE Paper 1 Computational thinking and programming skills - Python 2026 Questions Combined with FULL MARKING SCHEME Please write clearly in block capitals. Centre number Candidate number Surmame Forename(s) Candidate signature GCSE COMPUTER SCIENCE Paper 1 Computational thinking and programming skills - Python | declare this is my own work. Monday 12 May 2025 Afternoon Time allowed: 2 hours Materials 4 , e There are no additional materials required for this paper. Bou Examinet she e You must not use a calculator. Question Mark. Instructions \ 1 e Use black ink or black ball-point pen. Use pencil only for drawing. 2 e Answer all questions. e You must answer the questions in the spaces provided. 7 e If you need extra space for your answer(s), use the lined pages at the end of 4 this book. Write the question number against your answer(s). 5 e Do all rough work in this book. Cross through any work you do not want to be marked. 8 e Questions that require a coded solution must be answered in Python. 7 e You should assume that all indexing in code starts at 0 unless stated otherwise. 8-9 Information 10 The total number of marks available for this paper is 90. 14 - TOTAL Advice For the multiple-choice questions, completely fill in the lozenge alongside the appropriate answer. correct METHOD [@] — wronemetHons | © | © | = & If you want to change your answer you must cross out your original answer as shown. Be If you wish to return to an answer previously crossed out, ring the answer you now wish to select as shown. JuNn2585251868601 for more: tyri "5 57 IB/G/Jun25/G4003/E 11 3 2 1 B Do not write outside the [3] State the relational operator used in the program in Figure 1. box [1 mark] [4] Complete the trace table for the program in Figure 1. You may not need to use all the rows in the table. [4 marks] a b c Output 7 Turn over for the next question Turn over >» | ll for more: tyrionpapers.com IB/G/Jun25/8525/1B Do not write outside the box A coffee shop has a loyalty scheme which rewards customers for buying drinks. The customer gets one stamp on their loyalty card for each individual drink they buy. « Every 4th stamp on the card gets the customer a free biscuit. « Every Sth stamp on the card gets the customer a free pastry. « When the customer reaches 20 stamps, they get a free cake (but no biscuit or pastry). The Python program shown in Figure 2 should display whether the customer gets a free biscuit, pastry, cake or nothing free for their first 20 drinks. For each drink purchased, the program must output either: "Free biscuit", "Free pastry", "Free cake" or"Nothing free". Some parts of the program have been replaced with the labels @ to ®. Figure 2 i=l while i <= 20: if i % 20 == print ("Free cake") elif @: print ("Free pastry") elif i % 4 == else: i=idtil [1] State the Python code that should be written in place of the labels in the program written in Figure 2. [3 marks] | ll for more: tyrionpapers.com IB/G/Jun25/8525/1B Write a Python program that calculates the total cost of a netball coaching session for a group of students. The total cost is calculated as follows: « A booking fee of £20 plus: o £5 per student if there are 15 students or fewer o £3 per student if there are more than 15 students If there are more than 25 students, a booking fee of £100 and no other charges. Your program should: ¢ get the user to enter the number of students ¢ output the total cost of the session. You should use indentation as appropriate, meaningful variable name(s) and Python syntax in your answer. The answer grid below contains vertical lines to help you indent your code. [8 marks] | ll for more: tyrionpapers.com IB/G/Jun25/8525/1B Do not write outside the ‘box Do not write outside the ‘box Turn over >» for more: tyrionpapers.com IB/G/Jun25/8525/1B Question 4 continues on the next page a2 Turn over >» for more: tyrionpapers.com IB/G/Jun25/8525/1B Do not write outside the box 10 [3] Which of the following statements best describes boundary test data? Shade one lozenge. [1 mark] A __ Data that is not of the allowed data type fe] B Data that is at the limits of the allowed range fe] C Data that is expected by the program fe] D Data that will cause a syntax error fe] [4] The programmer has started planning the tests that will be used to check the program is working correctly. The program should: « check that the first name has more than one character and fewer than 15 characters: o if ithas, then output the message Name accepted o ifit has not, then output the message Name not accepted The start of the test plan is shown in Figure 3. Figure 3 Test Type of number Test data test data Expected result 1 Thomas Normal Name accepted 2 Boundary Name not accepted State the number of characters that a string used for test number 2 in Figure 3 could contain. [1 mark] [5] Normal and boundary are two types of test data. State one type of test data that has not been used in Figure 3. [1 mark] Ill cre IB/G/Jun25/8525/1B Do not write outside the ‘box 12 [6] A programmer is designing an algorithm to generate usernames for users. Do not write outside the box The algorithm should: ¢ ask the user to input their first name and their last name ° create a username: o if their first name has more than three characters, their username will consist of the first three characters of their first name followed by their last name o if their first name has three or fewer characters, their username will consist of their full first name followed by their last name ¢ output the username. Figure 4 contains the statements required to implement a version of this algorithm. 068868 Figure 4 firstName © USERINPUT LEN (firstName) > 3 username © firstName + lastName OUTPUT username username © SUBSTRING(0, 2, firstName) + lastName lastName © USERINPUT Using the labels @ to ®) shown in Figure 4, complete the flowchart to implement the algorithm. [3 marks] for more: tyrionpapers.com IB/G/Jun25/8525/1B 13 Do not write outside the box START STOP 13 Turn over for the next question Turn over >» | ll i ll for more: tyrionpapers.com 02 IB/G/Jun25/8525/1B 15 IB/G/Jun25/8525/1B Do not write itside the [4] Rewrite the program in Figure 5 so that it achieves the same result but uses an bo iteration structure that contains only one input () statement. Your answer must be written in Python. You should use indentation as appropriate, meaningful variable name(s) and Python syntax in your answer. The answer grid below contains vertical lines to help you indent your code. [5 marks] 8 Turn over > MU) _— 02 16 (ofe}{1] Aseries of numbers shown in Figure 6 are to be sorted into ascending order (from smallest to largest). Figure 6 45 23 78 55 49 A bubble sort algorithm has been developed to sort the numbers in Figure 6. Fill in the table to show the steps involved in applying a bubble sort algorithm to sort the numbers shown in Figure 6. You should show the new order every time the order has changed. [3 marks] 45 23 78 55 49 23 45 49 55 78 for more: tyrionpapers.com IB/G/Jun25/8525/1B Do not write outside the ‘box 18 Do not write itside the [3] State one advantage and one disadvantage of a bubble sort compared to a merge a sort. [2 marks] Advantage Disadvantage. [4] The programmer has an array of 2500 numbers, stored in ascending order (smallest to largest). The programmer needs to write a program to search for a value in the array. Explain why a binary search is better than a linear search for this array. [2 marks] 10 | ll for more: tyrionpapers.com IB/G/Jun25/8525/1B 19 Do not write . itside the Turn over for the next question ouSOK DO NOT WRITE ON THIS PAGE ANSWER IN THE SPACES PROVIDED Turn over > | ll for more: tyrionpapers.com IB/G/Jun25/8525/1B