An access control system uses different types of keycards. Each card type has a specific code, as shown in the table below:
| Code | Card Type |
|---|---|
| ST | Student |
| SF | Staff |
| VS | Visitor |
A program is written to update card permissions. The program:
ValidateCardType() to check whether the entered code is validUpdatePermission()01 cardType = input("Enter card type code: ")
02 if (ValidateCardType(cardType)) then
03 cardNumber = input("Enter unique card number: ")
04 cardID = cardType + cardNumber
05 UpdatePermission(cardID)
06 endif
Give the line number that contains the call to the prewritten validation function.
Practise OCR GCSE Computer Science Programming fundamentals with exam-style questions for GCSE Computer Science. 100 questions, matched to the OCR GCSE Computer Science (J277) specification and written in Component 01 and Component 02 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.