Programming
468 questions. Open a question to solve it and check the official answer.
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 …
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
Programming basics · 16 marks · official answer ready
(ii) What useful information does this pseudocode output? For Examiner's Use [1]
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]
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]
Programming basics · 16 marks · official answer ready
(v) Write pseudocode to demonstrate your answer to (iv). [1] 10
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 +…
Programming basics · 17 marks · official answer ready
(vii) Could this pseudocode be written using a FOR-ENDFOR structure? Justify your answer. [2] 11
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…
Structured programming · 1 mark · official answer ready
(i) State the difference between a procedure and a function. [1]
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
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…
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
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]
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…
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…
Programming basics · 17 marks · official answer ready
(d) Write a logic expression which tests this condition. [2] 7
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 …
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
Programming basics · 16 marks · official answer ready
(ii) What useful information does this pseudocode output? For Examiner's Use [1]
