←

Programming

From Paper 1: Computational thinking and programming skills
21 mark
Which data type is most suitable for storing a person's height in metres?
From Paper 1: Computational thinking and programming skills
66 marks
Write a program that asks the user to enter a password and keeps asking until the password is at least 8 characters long. It should then output 'Accepted'. You may use AQA pseudo-code or a high-level language.
From Paper 1: Computational thinking and programming skills
7.11 mark
The subroutine below calculates the area of a rectangle.
SUBROUTINE area(w, h)  RETURN w * hENDSUBROUTINE
Identify one parameter used in the subroutine.
From Paper 1: Computational thinking and programming skills
7.22 marks
Explain one advantage of using local variables in subroutines.
From Paper 1: Computational thinking and programming skills
7.33 marks
Write a subroutine called perimeter that takes the width and height of a rectangle and returns its perimeter.
From Paper 1: Computational thinking and programming skills
8.11 mark
An array is declared: scores ← [12, 45, 7, 30, 21]. Arrays are indexed from 0. State the value of scores[2].
From Paper 1: Computational thinking and programming skills
8.26 marks
Write an algorithm that finds the highest value in scores and the index where it is stored, and outputs both.
From Paper 1: Computational thinking and programming skills
9.11 mark
name ← 'Plasmo'. State the value returned by LEN(name).
From Paper 1: Computational thinking and programming skills
9.21 mark
In AQA pseudo-code, SUBSTRING(start, end, string) returns characters from position start to end inclusive (from 0). State the value of SUBSTRING(0, 2, name).
From Paper 1: Computational thinking and programming skills
9.34 marks
Write an algorithm that counts the number of vowels (a, e, i, o, u) in a string entered by the user and outputs the count.
From Paper 1: Computational thinking and programming skills
10.14 marks
Write code that asks for a mark between 0 and 100 inclusive and repeats the request until a valid mark is entered.
From Paper 1: Computational thinking and programming skills
10.22 marks
Explain the difference between validation and verification.
From Paper 1: Computational thinking and programming skills
10.35 marks
Write an authentication routine. The stored username is 'admin' and password is 'Plasm0!'. The user has three attempts; output 'Welcome' if correct or 'Locked' after three failures.
From Paper 1: Computational thinking and programming skills
11.13 marks
A program accepts ages from 11 to 16 inclusive. Give one example each of normal, boundary and erroneous test data.
From Paper 1: Computational thinking and programming skills
11.22 marks
Explain the difference between a syntax error and a logic error.
From Paper 1: Computational thinking and programming skills
126 marks
Write a program that simulates rolling two six-sided dice 1,000 times and outputs how many times the total was 7. Use RANDOM_INT(1, 6) for a random integer from 1 to 6.
From Paper 1: Computational thinking and programming skills
13.11 mark
A 2D array is declared: grid ← [[3, 5, 2], [8, 1, 4]]. State the value of grid[1][2] (row, column, indexed from 0).
From Paper 1: Computational thinking and programming skills
13.24 marks
Write an algorithm that outputs the total of every value in grid.
From Paper 1: Computational thinking and programming skills
149 marks
A cinema charges £6 for children (under 12), £7 for seniors (65 and over) and £10 for everyone else. Write a program that: asks how many tickets are needed; asks for the age of each person; calculates the total cost; applies a 20% discount if the user says it is Tuesday; outputs the total cost.
From Paper 1: Computational thinking and programming skills
15.12 marks
Explain what is meant by a structured approach to programming.
From Paper 1: Computational thinking and programming skills
16.11 mark
x ← 7. State whether (x > 5 AND x < 10) OR x = 0 is True or False.
From Paper 1: Computational thinking and programming skills
16.22 marks
Write a selection statement that outputs 'Teen' if age is between 13 and 19 inclusive.
From Paper 1: Computational thinking and programming skills
17.12 marks
Explain why a programmer might use a FOR loop rather than a WHILE loop.
From Paper 1: Computational thinking and programming skills
17.22 marks
Give two benefits of using subroutines.
Score 0 / 71 · 0 of 24 marked

This paper is written by Plasmo in the style of the AQA GCSE Computer Science exam. It is not a past paper and is not produced or endorsed by the exam board.

Programming Exam Questions: AQA GCSE Computer Science | Plasmo