Computer Science For First Examination In 2021 9618 · 11

Programming

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

2024 October-November · Paper 43 · Q1(b)(iii)

Structured programming · 1 mark · official answer ready

(iii) Test your program. Take a screenshot of the output. Save your program. Copy and paste the screenshot into part 1(b)(iii) in the evidence document. [1] 4

2024 October-November · Paper 43 · Q1(c)

Constructs · 4 marks · official answer ready

(c) The function CompareStrings(): • takes two strings as parameters • compares each string, one character at a time, to identify which string comes first alphabetically. If the f…

2024 October-November · Paper 43 · Q1(d)(ii)

Structured programming · 2 marks · official answer ready

(ii) Write program code to amend the main program to: • call Bubble() with the unsorted array as a parameter • call FormatArray() with the sorted array and output the returned str…

2024 October-November · Paper 43 · Q1(d)(iii)

Structured programming · 1 mark · official answer ready

(iii) Test your program. Take a screenshot of the output. Save your program. Copy and paste the screenshot into part 1(d)(iii) in the evidence document. [1] 6

2024 October-November · Paper 43 · Q3(c)(i)

Constructs · 2 marks · official answer ready

(i) Write program code for OutputLinkedList(). Save your program. Copy and paste the program code into part 3(c)(i) in the evidence document. [2]

2024 October-November · Paper 43 · Q3(d)(ii)

Structured programming · 1 mark · official answer ready

(ii) Amend the main program to: • call RemoveData() with the parameter 5 • output the word "After" • call OutputLinkedList(). Save your program. Copy and paste the program code in…

2024 October-November · Paper 43 · Q3(d)(iii)

Constructs · 1 mark · official answer ready

(iii) Test your program with both sets of given test data: Test data set 1: 5 6 8 9 5 Test data set 2: 10 7 8 5 6 Take a screenshot of each output. Save your program. Copy and pas…

2024 October-November · Paper 43 · Q3(e)(iii)

Programming basics · 7 marks

3 0.8 2 0.9 1 1.0 For example: • The horse Jet has PercentageSuccess of 65 and MaxFenceHeight of 160. • A fence has a height of 140 and a risk of 3. • The height of the fence is l…

2024 October-November · Paper 43 · Q5(d)(i)

Structured programming · 6 marks

5 1 2 3 8 Take a screenshot of the output. Save your program. Copy and paste the screenshot into part 3(c)(iii) in the evidence document. [1] 15 (d) The procedure RemoveData() rem…

2024 October-November · Paper 43 · Q5(d)(ii)

Structured programming · 2 marks

5 1 2 3 8 Take a screenshot of the output. Save your program. Copy and paste the screenshot into part 3(c)(iii) in the evidence document. [1] 15 (d) The procedure RemoveData() rem…

2024 May-June · Paper 11 · Q5(b)

Constructs · 5 marks · official answer ready

(b) The bank wants to protect the integrity of its data while transferring the data to other banks. Parity check is one example of data verification. Complete the description of p…

2024 May-June · Paper 11 · Q8(a)

Constructs · 5 marks · official answer ready

(a) The business is deciding which topology to use. Tick (✓) one or more boxes in each row to identify the topology, or topologies, each statement describes. Statement Bus Star Me…

2024 May-June · Paper 11 · Q8(b)(ii)

Constructs · 2 marks · official answer ready

(ii) One difference between an IPv4 and IPv6 address is that the numbers in an IPv4 address are separated by full stops and in an IPv6 address they are separated by colons. Identi…

2024 May-June · Paper 12 · Q8(c)

Constructs · 2 marks · official answer ready

(c) The programmer uses program libraries when developing the program. Describe two benefits to the programmer of using program libraries. 1 ......................................…

2024 May-June · Paper 13 · Q7(c)

Programming basics · 2 marks · official answer ready

(c) The navigation system can be considered an example of a control system. Describe how feedback is used in a control system. ....................................................…

2024 May-June · Paper 21 · Q1(c)(iii)

Programming · 1 mark · official answer ready

(iii) The choice of suitable variable names is one example of good programming practice. Give one other example. ..................................................................…

2024 May-June · Paper 21 · Q2(b)

Programming basics · 2 marks · official answer ready

(b) Step 1 of the algorithm is changed. A variable ThisSequence is used to enter a sequence of 10 pairs of numeric values, using a single input statement. Following the input of T…

2024 May-June · Paper 21 · Q7

Constructs · 0 marks

7 6 5 B C 4 3 2 A 1 x A triangle is said to be right-angled if the following test is true (where A is the length of the longest side): A2 = B2 + C2 A2 means A multiplied by A, for…

2024 May-June · Paper 22 · Q1(a)

Constructs · 4 marks · official answer ready

1 (a) The following table contains pseudocode examples. Each example may contain statements that relate to one or more of the following: • selection • iteration (repetition) • inp…

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

Programming basics · 5 marks · official answer ready

(a) An algorithm for part of the program will: • input three numeric values and assign them to identifiers Num1, Num2 and Num3 • assign the largest value to variable Ans • output …