Programming
258 questions. Open a question to solve it and check the official answer.
Programming basics · 1 mark · official answer ready
(b) INPUT x IF x = "" THEN OUTPUT "Invalid" ENDIF .................................................................................................................................…
Programming basics · 1 mark · official answer ready
(a) INPUT x IF x < 0 OR x > 10 THEN OUTPUT "Invalid" ENDIF ........................................................................................................................…
Programming basics · 1 mark · official answer ready
(b) INPUT x IF x = "" THEN OUTPUT "Invalid" ENDIF .................................................................................................................................…
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…
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…
Constructs · 7 marks · official answer ready
(a) Write pseudocode for the module GetStart(). ...................................................................................................................................…
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…
Constructs · 4 marks · official answer ready
(b) Explain how an interpreter executes a program without producing a complete translated version of it. ..........................................................................…
Constructs · 2 marks · official answer ready
9 (a) Describe what is meant by an imperative (procedural) programming language. ..................................................................................................…
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…
Constructs · 4 marks · official answer ready
(b) Explain how an interpreter executes a program without producing a complete translated version of it. ..........................................................................…
Constructs · 2 marks · official answer ready
9 (a) Describe what is meant by an imperative (procedural) programming language. ..................................................................................................…
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…
Constructs · 4 marks · official answer ready
(b) Explain how an interpreter executes a program without producing a complete translated version of it. ..........................................................................…
Constructs · 2 marks · official answer ready
9 (a) Describe what is meant by an imperative (procedural) programming language. ..................................................................................................…
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…
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…
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…
