Computer Science 0478 · 8

8.1 Programming concepts

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

Reset
2024 October-November · Paper 22 · Q7(b)

Programming concepts · 1 mark · official answer ready

(b) State the purpose of this algorithm. ..........................................................................................................................................…

2024 October-November · Paper 22 · Q7(c)

Programming concepts · 2 marks · official answer ready

(c) Describe the problem that would be caused in this algorithm if a Value of 1, 0 or less than –1 was input. .....................................................................…

2024 October-November · Paper 22 · Q10

Programming concepts · 6 marks · official answer ready

10 The function LENGTH(X) calculates the length of a string X Write the pseudocode statements to: • allow a line of text to be input to an appropriate variable • store this line o…

2024 October-November · Paper 23 · Q6

Programming concepts · 10 marks

6 An incomplete algorithm has been written in pseudocode to count the number of values stored in an array and to find their average. Values have been stored in the array starting …

2024 October-November · Paper 23 · Q6(a)

Programming concepts · 4 marks · official answer ready

6 An incomplete algorithm has been written in pseudocode to count the number of values stored in an array and to find their average. Values have been stored in the array starting …

2024 October-November · Paper 23 · Q6(b)

Programming concepts · 4 marks · official answer ready

6 An incomplete algorithm has been written in pseudocode to count the number of values stored in an array and to find their average. Values have been stored in the array starting …

2024 October-November · Paper 23 · Q6(c)

Programming concepts · 4 marks · official answer ready

6 An incomplete algorithm has been written in pseudocode to count the number of values stored in an array and to find their average. Values have been stored in the array starting …

2024 October-November · Paper 23 · Q14

Programming concepts · 0 marks

14 WHILE NOT Found AND Accept AND Index < LENGTH(Password)

2024 October-November · Paper 23 · Q15

Programming concepts · 0 marks

15 IF SUBSTRING(Password, Index, 1) = '!'

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

Programming concepts · 4 marks · official answer ready

(c) The table contains different types of sensors and a use for each. Complete the table by giving a suitable use for each type of sensor. The first one has been done for you. typ…

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

Programming concepts · 4 marks · official answer ready

(a) Draw one line to link each description to the most appropriate programming concept. Not all programming concepts will be used. Description Programming concept function a subro…

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

Programming concepts · 2 marks · official answer ready

(b) Write the pseudocode to use a procedure named Average that passes the values 25 and 50 to the procedure. ......................................................................…

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

Programming concepts · 3 marks · official answer ready

(c) Outline the role of procedures and functions in creating a program that is easier to maintain. ................................................................................…

2024 May-June · Paper 21 · Q3

Programming concepts · 4 marks · official answer ready

3 State what is meant by the data types integer and real. Give an example of each. Integer ........................................................................................…

2024 May-June · Paper 21 · Q4(c)

Programming concepts · 4 marks · official answer ready

(c) Explain how you should alter the original corrected algorithm to make sure that all the numbers entered are between 1 and 500 inclusive. If any numbers fall outside these limi…

2024 May-June · Paper 21 · Q5

Programming concepts · 5 marks · official answer ready

5 Write the pseudocode statements to perform this task: • accept the input of a whole number from 1 to 4 inclusive • use a CASE statement to: ○ output the number (1 to 4 inclusive…

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

Programming concepts · 4 marks · official answer ready

(b) The function LENGTH(X) calculates the length of a string X Write the pseudocode statements to: • read the contents of the text file Quotation.txt into an appropriate string va…

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

Programming concepts · 2 marks · official answer ready

(i) Write the pseudocode to make sure that the product code is six characters in length. ..........................................................................................…

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

Programming concepts · 2 marks · official answer ready

(ii) Write the pseudocode to make sure that the first two characters of the product code are “PD”. ................................................................................…

2024 May-June · Paper 22 · Q5

Programming concepts · 6 marks · official answer ready

5 A high-level programming language makes use of arithmetic, Boolean and logical operators. State how each type of operator is used. Give an example statement, in pseudocode, for …