Computer Science 2210 · 8

Programming

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

Reset
2023 October-November · Paper 23 · Q7

Programming concepts · 4 marks · official answer ready

7 A program uses both local variables and global variables. Describe two differences between local variables and global variables. Difference 1 ...................................…

2023 October-November · Paper 23 · Q8(b)

Programming concepts · 3 marks · official answer ready

(b) Describe how the algorithm should be changed to accept ‘Y’ or ‘y’ for a successfully manufactured part. .......................................................................…

2023 October-November · Paper 23 · Q10

Arrays · 15 marks · official answer ready

10 A weather station takes temperature readings once an hour for a week. These temperatures are stored in a two-dimensional (2D) array Temperatures[] Each column contains 24 readi…

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

Programming concepts · 6 marks · official answer ready

(b) Describe how the sensor and the microprocessor are used to automatically refill the water bowl. ...............................................................................…

2023 May-June · Paper 21 · Q2

Programming · 1 mark · official answer ready

2 Tick (ü) one box to show the name of the data structure used to store a collection of data of the same data type. A Array B Constant C Function D Variable [1] 3

2023 May-June · Paper 21 · Q4

Programming concepts · 4 marks · official answer ready

4 Explain the purpose of the library routines DIV and ROUND DIV ...................................................................................................................…

2023 May-June · Paper 21 · Q5(b)

Programming concepts · 4 marks · official answer ready

(b) Describe how you could change the corrected algorithm to record and output how many positive numbers have been included in the final total. You do not need to rewrite the algo…

2023 May-June · Paper 21 · Q6

Programming concepts · 4 marks · official answer ready

6 State two features that should be included to create a maintainable program. Give a reason why each feature should be used. 1 ...................................................…

2023 May-June · Paper 21 · Q8(a)

Programming concepts · 3 marks · official answer ready

8 The function LENGTH(Phrase) calculates the length of a string Phrase (a) Write the pseudocode statements to: • store the string "The beginning is the most important part" in Phr…

2023 May-June · Paper 21 · Q8(b)

Programming concepts · 2 marks · official answer ready

8 The function LENGTH(Phrase) calculates the length of a string Phrase (b) Write the output your pseudocode should produce. .......................................................…

2023 May-June · Paper 21 · Q11

Arrays · 15 marks · official answer ready

11 A one-dimensional (1D) array Days[] contains the names of the days of the week. A two-dimensional (2D) array Readings[] is used to store 24 temperature readings, taken once an …

2023 May-June · Paper 21 · Q13(c)

Arrays · 23 marks

(c) Describe one problem that could occur with this algorithm if an invalid character was input. ..................................................................................…

2023 May-June · Paper 22 · Q4(a)

Programming concepts · 3 marks · official answer ready

(a) Describe the validation checks that the programmer would need to use. .........................................................................................................…

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

Programming concepts · 3 marks · official answer ready

(ii) The input value needs to be stored in the variable Measurement Write pseudocode to perform the double entry check until a successful input is made. ..........................…

2023 May-June · Paper 22 · Q5

Programming concepts · 5 marks · official answer ready

5 Circle five file-handling operations. calculate close count create input open output print read sort search test total write [5]

2023 May-June · Paper 22 · Q6

Programming · 6 marks · official answer ready

6 State three different features of a high-level programming language that a programmer could use to make sure that their program will be easier to understand by another programme…

2023 May-June · Paper 22 · Q7(a)

Programming concepts · 8 marks · official answer ready

(a) Give the line number(s) for the statements showing: Totalling .................................................................................................................…

2023 May-June · Paper 22 · Q11(a)

Programming concepts · 2 marks · official answer ready

(a) Write pseudocode statements to declare the variables P and Q, store "The world" in P and store 'W' in Q .......................................................................…

2023 May-June · Paper 22 · Q11(b)

Programming concepts · 4 marks · official answer ready

(b) Write a pseudocode algorithm to: • convert P to upper case • find the position of Q in the string P (the first character in this string is in position 1) • store the position …

2023 May-June · Paper 22 · Q12

Programming concepts · 15 marks · official answer ready

12 A two-dimensional (2D) array Account[] contains account holders’ names and passwords for a banking program. A 2D array AccDetails[] has three columns containing the following d…