Computer Science For First Examination In 2021 9618 · 11

11.1 Programming basics

58 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2024 October-November · Paper 42 · Q2(g)(ii)

Programming basics · 1 mark · official answer ready

(ii) Test your program with the following inputs in the order given: 10 9 8 7 6 5 4 3 2 1 Take a screenshot of the output. Save your program. Copy and paste the screenshot into pa…

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 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 · 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 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 …

2024 May-June · Paper 22 · Q7(b)(ii)

Programming basics · 1 mark · official answer ready

(ii) Identify the input sequence that will cause the minimum number of state changes in the transition from S1 to S4. .............................................................…

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

Programming basics · 6 marks · official answer ready

(a) Write pseudocode for the procedure TwoParts(). ................................................................................................................................…

2024 May-June · Paper 23 · Q4(b)(i)

Programming basics · 2 marks · official answer ready

(i) Identify a suitable data structure that could be used to store the different total values. ....................................................................................…

2024 May-June · Paper 23 · Q4(b)(ii)

Programming basics · 3 marks · official answer ready

(ii) Describe three benefits of using the data structure given in part (b)(i). 1 ..................................................................................................…

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

Programming basics · 1 mark · official answer ready

(a) The integer numbers will be stored in the global 1D array, DataStored, with space for up to 20 integers. The global variable NumberItems stores the quantity of items the array…

2024 May-June · Paper 41 · Q1(c)(ii)

Programming basics · 0 marks · official answer ready

(ii) Test your program by inputting the following data in the order given: 30 5 3 9 4 1

2024 May-June · Paper 41 · Q4(e)(ii)

Programming basics · 14 marks

(ii) The procedure ChooseTree() needs amending. After the procedure has output the list of trees that meet all the requirements, the procedure needs to: • take as input the name o…

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

Programming basics · 1 mark · official answer ready

(a) The integer numbers will be stored in the global 1D array, DataStored, with space for up to 20 integers. The global variable NumberItems stores the quantity of items the array…

2024 May-June · Paper 43 · Q1(c)(ii)

Programming basics · 0 marks · official answer ready

(ii) Test your program by inputting the following data in the order given: 30 5 3 9 4 1

2024 May-June · Paper 43 · Q4(e)(ii)

Programming basics · 14 marks

(ii) The procedure ChooseTree() needs amending. After the procedure has output the list of trees that meet all the requirements, the procedure needs to: • take as input the name o…

2023 October-November · Paper 11 · Q9(a)

Programming basics · 2 marks · official answer ready

9 (a) Explain the importance of feedback in a control system. .....................................................................................................................…

2023 October-November · Paper 12 · Q9(b)

Programming basics · 0 marks · official answer ready

(b) The current contents of main memory and selected values from the ASCII character set are given on page 15. Trace the program currently in memory using the trace table when the…

2023 October-November · Paper 21 · Q1(b)

Programming basics · 3 marks · official answer ready

(b) The pseudocode contains four assignments to variable Level. One of these assignments will never be performed. Identify this assignment and explain why this is the case. ......…

2023 October-November · Paper 21 · Q7

Programming basics · 5 marks · official answer ready

7 An algorithm is represented by a state-transition diagram. The table shows the inputs, outputs and states for the algorithm: Current state Input Output Next state S1 A1 X1 S2 S2…

2023 October-November · Paper 23 · Q1(a)

Programming basics · 4 marks · official answer ready

(a) The following table shows four valid pseudocode assignment statements. Complete the table by giving the data type that should be used to declare the variable underlined in eac…