Question 4
OCR Computer Science Specimen Paper 2GCSE8 marks
On the specification
- (a)
- 2.1 Algorithms2.2 Programming fundamentals
- (b)(i)
- 2.1 Algorithms2.2 Programming fundamentals
- (b)(ii)
- 2.1 Algorithms2.2 Programming fundamentals
Question text
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 three letters of firstName username = name + first two letters of surname OUTPUT username Stop Fig. 2 For example, using the process in Fig. 2, Tom Ward’s username would be TomWa. (a) State, using the process in Fig. 2, the username for Rebecca Ellis. [1] (b) The program design is updated to create usernames as follows: • If the person is a teacher, their username is the last 3 letters of their surname and then the first 2 letters of their first name. • If the person is a student, their username is the first 3 letters of their first name and then the first 2 letters of their surname. (i) What would be the username for a teacher called Fred Biscuit using the updated process? [1] (ii) Write an algorithm for the updated program design shown in question 4(b)(i).