Programming
258 questions. Open a question to solve it and check the official answer.
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
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…
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…
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
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]
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…
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…
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…
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…
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…
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…
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…
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…
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 ......................................…
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. ....................................................…
Programming · 1 mark · official answer ready
(iii) The choice of suitable variable names is one example of good programming practice. Give one other example. ..................................................................…
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…
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…
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…
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 …
