A program creates usernames for a school - OCR - GCSE Computer Science - Question 4 - 2023 - Paper 1
Question 4
A program creates usernames for a school. The first design of the program is shown in the flowchart in Fig. 2:
Start
INPUT firstName
INPUT surname
name = first ... show full transcript
Worked Solution & Example Answer:A program creates usernames for a school - OCR - GCSE Computer Science - Question 4 - 2023 - Paper 1
Step 1
State, using the process in Fig. 2, the username for Rebecca Ellis.
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To determine Rebecca Ellis' username using the process shown in Fig. 2, we need to extract the first three letters from her first name and the first two letters from her surname.
The first name is Rebecca. The first three letters are: Reb.
The surname is Ellis. The first two letters are: El.
Combining these, the final username is: RebEl.
Step 2
What would be the username for a teacher called Fred Biscuit using the updated process?
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To find the username for Fred Biscuit using the updated process:
The surname is Biscuit. The last three letters are: uit.
The first name is Fred. The first two letters are: Fr.
Therefore, the username for Fred Biscuit is: uitFr.
Step 3
Write an algorithm for the updated program design shown in question 4(b)(i).
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Start
INPUT surname
INPUT firstName
username = last 3 letters of surname + first 2 letters of firstName
OUTPUT username
Stop