11.1 Programming basics
58 questions in this subtopic. Open a question to solve it and check the official answer.
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…
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…
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 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…
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 …
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. .............................................................…
Programming basics · 6 marks · official answer ready
(a) Write pseudocode for the procedure TwoParts(). ................................................................................................................................…
Programming basics · 2 marks · official answer ready
(i) Identify a suitable data structure that could be used to store the different total values. ....................................................................................…
Programming basics · 3 marks · official answer ready
(ii) Describe three benefits of using the data structure given in part (b)(i). 1 ..................................................................................................…
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…
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
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…
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…
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
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…
Programming basics · 2 marks · official answer ready
9 (a) Explain the importance of feedback in a control system. .....................................................................................................................…
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…
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. ......…
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…
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…
