Computer Science For First Examination In 2021 9618 · 11

Programming

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

2021 May-June · Paper 11 · Q6(b)

Programming basics · 1 mark · official answer ready

(b) INPUT x IF x = "" THEN OUTPUT "Invalid" ENDIF .................................................................................................................................…

2021 May-June · Paper 13 · Q6(a)

Programming basics · 1 mark · official answer ready

(a) INPUT x IF x < 0 OR x > 10 THEN OUTPUT "Invalid" ENDIF ........................................................................................................................…

2021 May-June · Paper 13 · Q6(b)

Programming basics · 1 mark · official answer ready

(b) INPUT x IF x = "" THEN OUTPUT "Invalid" ENDIF .................................................................................................................................…

2021 May-June · Paper 23 · Q2(a)

Constructs · 5 marks · official answer ready

2 (a) Four program modules form part of a program for a library. A description of the relationship between the modules is summarised as follows: Module name Description UpdateLoan…

2021 May-June · Paper 23 · Q2(c)

Programming basics · 6 marks · official answer ready

(c) A program will: • input 50 unique integer values • output the largest value • output the average of the values excluding the largest value. Draw a program flowchart to represe…

2021 May-June · Paper 23 · Q7(a)

Constructs · 7 marks · official answer ready

(a) Write pseudocode for the module GetStart(). ...................................................................................................................................…

2021 May-June · Paper 23 · Q7(c)

Constructs · 5 marks · official answer ready

(c) As a reminder, the module description of GetWord() is repeated: Module Description • Called with a parameter representing the position of the first character of a word in FNSt…

2021 May-June · Paper 31 · Q3(b)

Constructs · 4 marks · official answer ready

(b) Explain how an interpreter executes a program without producing a complete translated version of it. ..........................................................................…

2021 May-June · Paper 31 · Q9(a)

Constructs · 2 marks · official answer ready

9 (a) Describe what is meant by an imperative (procedural) programming language. ..................................................................................................…

2021 May-June · Paper 31 · Q9(c)

Constructs · 4 marks · official answer ready

(c) Identify the programming paradigm for each of these program code examples. Program code example Programming paradigm male(john). female(ethel). parent(john, ethel). FOR Counte…

2021 May-June · Paper 32 · Q3(b)

Constructs · 4 marks · official answer ready

(b) Explain how an interpreter executes a program without producing a complete translated version of it. ..........................................................................…

2021 May-June · Paper 32 · Q9(a)

Constructs · 2 marks · official answer ready

9 (a) Describe what is meant by an imperative (procedural) programming language. ..................................................................................................…

2021 May-June · Paper 32 · Q9(c)

Constructs · 4 marks · official answer ready

(c) Identify the programming paradigm for each of these program code examples. Program code example Programming paradigm male(john). female(ethel). parent(john, ethel). FOR Counte…

2021 May-June · Paper 33 · Q3(b)

Constructs · 4 marks · official answer ready

(b) Explain how an interpreter executes a program without producing a complete translated version of it. ..........................................................................…

2021 May-June · Paper 33 · Q9(a)

Constructs · 2 marks · official answer ready

9 (a) Describe what is meant by an imperative (procedural) programming language. ..................................................................................................…

2021 May-June · Paper 33 · Q9(c)

Constructs · 4 marks · official answer ready

(c) Identify the programming paradigm for each of these program code examples. Program code example Programming paradigm male(john). female(ethel). parent(john, ethel). FOR Counte…

2021 May-June · Paper 42 · Q4(c)(iv)

Constructs · 15 marks

4 answer 10 points Write program code for the procedure, readData() to: • read each question, answer and points from the text file • create an object of type TreasureChest for eac…

2021 May-June · Paper 43 · Q4(c)(iv)

Constructs · 15 marks

4 answer 10 points Write program code for the procedure, readData() to: • read each question, answer and points from the text file • create an object of type TreasureChest for eac…