ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions

N5 Computing Science 2017 Question 7

2 marks · Selection and logical operators

Part of a program is shown below. Line 1: DECLARE score AS REAL INITIALLY 0·0 Line 2: RECEIVE score FROM KEYBOARD Line 3: IF score > 2·0 THEN Line 4: SEND “Congratulations. You are in the final” TO DISPLAY Line 5: ELSE Line 6: SEND “You have failed to qualify” TO DISPLAY Line 7: END IF Describe what happens in Lines 3 to 6 when the value 1·4 is entered at Line 2.

Marking scheme

1.4/score/value is less than 2 (1 mark) Failed to qualify message is displayed or line 6 is executed (1 mark)

Previous question: N5 Computing Science 2017 Question 6

Next question: N5 Computing Science 2017 Question 8