Computing 9691 · 11

Programming

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

Reset
2013 May-June · Paper 22 · 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 22 · 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 22 · 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 22 · 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 22 · 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 22 · 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 22 · 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 22 · 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 22 · 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 22 · 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 23 · Q1(b)

Constructs · 4 marks · official answer ready

(b) Estimate how many records could be held in the file if there are 5 KB available for the file. [4] 3

2013 May-June · Paper 23 · Q2(b)(i)

Constructs · 10 marks · official answer ready

(i) Complete the trace table below using the file ExamResults. For Examiner's Use Count Mark Mark > 70 Output [4]

2013 May-June · Paper 23 · Q2(b)(ii)

Constructs · 7 marks · official answer ready

(ii) There is an error in the pseudocode. Write the correct statement. [1]

2013 May-June · Paper 23 · Q2(b)(iii)

Constructs · 7 marks · official answer ready

(iii) State the type of error. [1]

2013 May-June · Paper 23 · Q2(b)(iv)

Constructs · 7 marks · official answer ready

(iv) Write a suitable comment that could be added to explain the line Count ← Count + 1. [1] 6

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

Constructs · 10 marks · official answer ready

(c) The pseudocode given in (b) uses a REPEAT-UNTIL loop: For Examiner's OPENFILE ExamResults FOR INPUT Use Count ← 1 REPEAT FILEREAD next ExamResults record IF Mark > 70 THEN Cou…

2013 May-June · Paper 23 · Q3(f)

Structured programming · 1 mark · official answer ready

(f) MyAvMark is a variable of data type REAL. Meena wants the value of MyAvMark converted to the nearest whole number. State a function that will perform the conversion. [1] 9 The…

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

Structured programming · 1 mark · official answer ready

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

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

Structured programming · 2 marks · official answer ready

(ii) State why the module to calculate the average mark could be written as a procedure or a function. [2] 10

2013 May-June · Paper 23 · Q4(a)

Constructs · 3 marks · official answer ready

4 (a) Meena hopes some of her friends will use her program. When designing the user For interface, state three design features she can incorporate if one of her friends has a Exam…