May/June 2026 Paper 21

2026 · 12 questions · 20 parts · 75 marks

0/75 marks
0Correct0Partial0Wrong20Unattempted
Filters0 active

Questions

Select a part to jump to its question

Finish set
Q1–/1 mk
Q2–/4 mks
Q3–/3 mks
Q4–/4 mks
Q6–/4 mks
Q7–/4 mks
Q8–/7 mks
Q10–/9 mks
Q11–/5 mks
Q12–/15 mks
Context for question 5
A computer system automatically creates usernames for new users. A new user enters their first name and their last name.
The system: • takes the first letter of the first name • takes the first two letters of the last name • converts all the letters to upper case • generates a random whole number between 1 and 1000 inclusive.
For the following example: The first name is Muhammed The last name is Hann The generated number is 492 The username will be MHA492
5(a)Libraries Random Numbers SimulationEasy2 marks
Write the pseudocode to generate a whole random number between 1 and 1000 inclusive and store it in the variable GeneratedNumber.

Answer

0 words
5(b)String HandlingMedium3 marks
The last name is input into the variable LastName.
Write the pseudocode to: • take the first two letters from LastName • convert the letters to upper case • store the result in the variable Temp

Answer

0 words
5(c)File Handling ExceptionsMedium3 marks
The new username is stored in the variable NewUsername.
Write the pseudocode to store NewUsername to the file Username.txt

Answer

0 words
5(d)Data Validation VerificationMedium4 marks
Identify and describe verification checks that could be applied to the inputs of the first name and the last name of the user.

Answer

0 words