Computing 9691 · 11

Programming

468 questions. Open a question to solve it and check the official answer.

2013 May-June · Paper 21 · Q2(e)

Programming basics · 19 marks · official answer ready

(e) DateReturned will have to be later than HandInDate, the same or earlier than the For current date, and a mark has been entered. Examiner's Use Write pseudocode that will test …

2013 May-June · Paper 21 · Q2(f)(i)

Programming basics · 19 marks · official answer ready

(i) Complete the trace table using the data in the table above. Count Mark Mark < 40 Output [4] 9

2013 May-June · Paper 21 · Q2(f)(ii)

Programming basics · 16 marks · official answer ready

(ii) What useful information does this pseudocode output? For Examiner's Use [1]

2013 May-June · Paper 21 · Q2(f)(iii)

Programming basics · 17 marks · official answer ready

(iii) Meena has written the above pseudocode with features that make it easy to understand. State two such features. Feature 1 Feature 2 [2]

2013 May-June · Paper 21 · Q2(f)(iv)

Programming basics · 16 marks · official answer ready

(iv) State one other feature that could be introduced to this pseudocode to make it easier to understand. [1]

2013 May-June · Paper 21 · Q2(f)(v)

Programming basics · 16 marks · official answer ready

(v) Write pseudocode to demonstrate your answer to (iv). [1] 10

2013 May-June · Paper 21 · Q2(f)(vi)

Constructs · 18 marks · official answer ready

(vi) The pseudocode at the start of (f) was: For Examiner's OPENFILE MyAssignments FOR INPUT Use Count ← 0 REPEAT FILEREAD next assignment record IF Mark < 40 THEN Count ← Count +…

2013 May-June · Paper 21 · Q2(f)(vii)

Programming basics · 17 marks · official answer ready

(vii) Could this pseudocode be written using a FOR-ENDFOR structure? Justify your answer. [2] 11

2013 May-June · Paper 21 · Q3(c)

Structured programming · 1 mark · official answer ready

(c) Good programming practice uses local variables. What is the scope of a local variable? [1] To make future computation more straightforward Meena retrieves her marks from the f…

2013 May-June · Paper 21 · Q3(g)(i)

Structured programming · 1 mark · official answer ready

(i) State the difference between a procedure and a function. [1]

2013 May-June · Paper 21 · Q3(g)(ii)

Structured programming · 1 mark · official answer ready

(ii) State why the sub-routine to calculate the average mark could be written as a function. [1] 13

2013 May-June · Paper 21 · Q3(h)(i)

Structured programming · 1 mark · official answer ready

(i) What is returned by INT(34.2)? [1] AvMark may be a decimal number such as 79.7 or 34.2. Meena wants the answer rounded to the nearest whole number. A variable, Rounded, is ass…

2013 May-June · Paper 21 · Q3(h)(iii)

Structured programming · 4 marks · official answer ready

(iii) Write program code for a function CalculateRounded which returns the rounded average mark. Programming language Code [4] 14

2013 May-June · Paper 22 · Q2(a)

Programming basics · 17 marks · official answer ready

(a) Write a logic expression to be used as the validation rule for the acceptance of data in the IsMarked field. [2]

2013 May-June · Paper 22 · Q2(c)

Programming basics · 4 marks

2 [2] One way of storing her data will be to use a file of records. Each record will contain at least the following data: Data Identifier Description of input data subject Subject…

2013 May-June · Paper 22 · Q2(c)(i)

Programming basics · 16 marks · official answer ready

(i) Meena uses three items of data to test this logic. In the table below enter ‘normal’ For or ‘borderline’ in the empty cells. Examiner's Use HandInDate Type of Data 30142015 in…

2013 May-June · Paper 22 · Q2(d)

Programming basics · 17 marks · official answer ready

(d) Write a logic expression which tests this condition. [2] 7

2013 May-June · Paper 22 · Q2(e)

Programming basics · 19 marks · official answer ready

(e) DateReturned will have to be later than HandInDate, the same or earlier than the For current date, and a mark has been entered. Examiner's Use Write pseudocode that will test …

2013 May-June · Paper 22 · Q2(f)(i)

Programming basics · 19 marks · official answer ready

(i) Complete the trace table using the data in the table above. Count Mark Mark < 40 Output [4] 9

2013 May-June · Paper 22 · Q2(f)(ii)

Programming basics · 16 marks · official answer ready

(ii) What useful information does this pseudocode output? For Examiner's Use [1]