Computer Science 0478 · 8

Programming

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

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…

2023 May-June · Paper 23 · Q1

Programming concepts · 1 mark · official answer ready

1 Tick (3) one box to complete the sentence. A constant A stores a value that can change at any time during the execution of a program. B stores a value that cannot change during …

2023 May-June · Paper 23 · Q2

Programming concepts · 4 marks · official answer ready

2 Explain the purpose of the library routines MOD and RANDOM MOD ..................................................................................................................…

2023 May-June · Paper 23 · Q3

Programming concepts · 3 marks · official answer ready

3 Describe what happens when a function is called during the execution of a program. ..............................................................................................…

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

Programming concepts · 3 marks · official answer ready

(b) Write an algorithm in pseudocode to make sure that an input for the variable Length is between 15 and 35 inclusive. The code must iterate until a valid input has been made and…

2023 May-June · Paper 23 · Q6(b)

Programming concepts · 5 marks · official answer ready

(b) Describe the changes you should make to the corrected algorithm so that a count-controlled loop is used to allow 100 positive numbers to be input. You do not need to rewrite t…