AQA GCSE Computer Science Paper 1, June 2025: question 4

A PrepWise guide to a real paper, with our descriptions and answers. Not made or approved by AQA.

PrepWise guide: AQA GCSE Computer Science Paper 1Question 44 of 11

An app registers users and must check the first name typed in. A name is allowed when it has more than 1 character and fewer than 15, and the app prints Name accepted for a good name and Name not accepted for a bad one. Figure 3 starts a test plan for this check. Another part of the app builds a username: it asks for the first and last names, uses the first 3 characters of a first name longer than 3 characters (otherwise the whole first name), adds the last name and shows the result. Figure 4 lists the statements, each with a numbered label, and Figure 4B is the empty flowchart frame to fill.

Figure 3
A test plan table with a header row, a filled first row and a second row whose test data cell is empty.Open full size to read the labels (Figure 3, opens in a new tab)
Figure 4
Six statements of an algorithm, each with a numbered black circle in front, listed one under another.Open full size to read the labels (Figure 4, opens in a new tab)
Figure 4B
An empty flowchart frame: a start box, two parallelogram boxes, a decision with a yes exit going down and a no exit going right, an empty box on each exit, a parallelogram box and a stop box, joined by arrows.Open full size to read the labels (Figure 4B, opens in a new tab)
04.1[1 mark]

Choose the best statement of what validation is for.

See how you would score on Input Validation

Our own questions on this topic, marked straight away, so you see what to revise. Free now.

It confirms the user is a person and not a program
It verifies the identity of the person typing
It confirms the input is a genuine name
It confirms the input is sensible for what the program needsCorrect answer
Show model answer for 04.1Hide model answer for 04.1

Validation checks that the input is sensible. It cannot prove the name is real or that the user is a person, only that the data is reasonable, for example that its length is allowed.

1 mark

How the marks are earned

  1. The purpose is to test whether the data entered is sensible for the program to use.
  2. Choosing more than one option earns nothing.
Revise Input Validation
04.2[6 marks]

Write a program that asks for a first name until its length is allowed, printing the right message each time, with meaningful variable names.

See how you would score on Iteration (Loops)
Show model answer for 04.2Hide model answer for 04.2
valid = False
while not valid:
   first_name = input("First name: ")
   name_length = len(first_name)
   if name_length > 1 and name_length < 15:
      print("Name accepted")
      valid = True
   else:
      print("Name not accepted")
6 marks

How the marks are earned

  1. An iteration structure is used that repeats until a name of an allowed length is entered (design mark).
  2. A string's length is worked out properly, at least once.
  3. At least one Boolean condition tests the name or its length against one of the two limits, even if the length is not coded correctly or is missing. Quotes round the numbers in this one condition are tolerated.
  4. All the length checks are made and combined correctly. Quotes round the numbers in this condition lose the mark.
  5. A name can be entered again inside the iteration structure.
  6. A structure prints the accepted message when the length is allowed and the rejected message otherwise, on every path through the program. Equivalent wording of a message is credited, and a faulty condition does not lose this mark if each message sits where it belongs.
  7. The case of the code is ignored; messages with the input statements are optional; gaps are ignored unless they change the logic.
  8. If the code has any error, the maximum is 5 marks.
  9. The design mark is for choosing a suitable technique and is credited whether or not the syntax is correct and whether or not the program works.

Why it scores

The while loop is the iteration and it keeps going until the flag valid becomes True. Inside it, len() finds the length and one condition joined with and checks both limits. A good name prints Name accepted and ends the loop. Any other name prints Name not accepted and the loop asks again.

Revise Iteration (Loops)
04.3[1 mark]

Pick the option that explains what boundary test data is.

See how you would score on Testing
Input of a type the program does not accept
Data at the edge of what is allowedCorrect answer
Data the program is designed to receive
Data that would produce a syntax error
Show model answer for 04.3Hide model answer for 04.3

Boundary data sits at the edge of the allowed range, on or just beside a limit. Wrong-type data is erroneous, and data the program expects is normal.

1 mark

How the marks are earned

  1. Boundary data sits right on the edge of the range the program accepts.
  2. Choosing more than one option earns nothing.
Revise Testing
04.4[1 mark]

How long could the test 2 name in Figure 3 be? Give a character count.

See how you would score on Testing
Show model answer for 04.4Hide model answer for 04.4

1 character, or 15 characters. Allowed names have 2 to 14 characters, so 1 and 15 are the values just outside the limits that must be rejected.

1 mark

How the marks are earned

  1. 1 or 15 characters.
  2. Giving both 1 and 15 is also accepted.
Revise Testing
04.5[1 mark]

Name one type of test data, other than normal and boundary, that the test plan so far leaves out.

See how you would score on Testing
Show model answer for 04.5Hide model answer for 04.5

Erroneous (invalid) test data. This is data the program should reject, such as data of the wrong type.

1 mark

How the marks are earned

  1. Erroneous test data, also called invalid.
  2. A description of erroneous data, such as data of the wrong type, is also accepted.
  3. Minor spelling mistakes are ignored.
  4. Typical, extreme, boundary and normal are rejected.
Revise Testing
04.6[3 marks]

Place the numbered statements of Figure 4 into the frame in Figure 4B so the flowchart builds the username.

See how you would score on Pseudocode & Flowcharts
Show model answer for 04.6Hide model answer for 04.6
START
  |
  v
[1] firstName ← USERINPUT
  |
  v
[6] lastName ← USERINPUT
  |
  v
[2] LEN(firstName) > 3 ?  -- no --> [3] username ← firstName + lastName
  |                                                                   |
 yes                                                                  |
  v                                                                   |
[5] username ← SUBSTRING(0, 2, firstName) + lastName                  |
  |                                                                   |
  +-------------------------------------------------------------------+
                                   |
                                   v
                           [4] OUTPUT username
                                   |
                                   v
                                 STOP
3 marks

How the marks are earned

  1. Labels 1 and 6 come first, in either order, and label 4 is the final step after the decision.
  2. Label 2 is the decision, with one exit for yes and one for no.
  3. Label 5 is on the yes exit and label 3 is on the no exit, and both lead on to label 4.
  4. Any pseudo-code written next to a label is ignored. If the labels are left out, the exact statements from the figure are accepted instead.

Why it scores

Each arrow shows which step runs next. Both names are read first, then the decision label 2 splits the path into a yes branch and a no branch. A first name longer than 3 characters takes label 5 and keeps only its first 3 characters. Any other name takes label 3 and keeps all of it. Both branches meet again at label 4, which outputs the username.

Revise Pseudocode & Flowcharts
AQA owns the copyright in its exam questions, so we cannot copy their wording. These descriptions and answers are ours. Not made or approved by AQA.[13 marks]