Ict Classwork
Ict Classwork
P22M001
Which of the following statement(s) is/are correct?
(1) An algorithm contains an infinite sequence of steps.
(2) An algorithm is used to generate a solution of a problem.
(3) In an algorithm, the steps are organized in a specific logical order.
A. (2) only
B. (1) and (3) only
C. (2) and (3) only
D. (1), (2) and (3)
P22M002
Which of the following is/are used to describe an algorithm in a narrative form?
A. Flowchart
B. Pseudocode
C. Both flowchart and pseudocode
D. None of the above
P22M003
Which of the following symbols is used to represent a decision in a flowchart?
A.
B.
C.
D.
© Pearson Education Asia Limited 2017 1 NSS ICT Compulsory Question Bank
P22M004
What does the following flowchart symbol represent?
A. Input
B. Process
C. Connector
D. Predefined process
P22M005
Which of the following should be taken into consideration when constructing a user interface?
(1) Form field validation
(2) Consistency in the interface
(3) Appropriate placement of different elements on the interface
A. (2) only
B. (1) and (2) only
C. (1) and (3) only
D. (1), (2) and (3)
P22M006
Which of the following is not a data type?
A. Integer
B. Real
C. Variable
D. Character
© Pearson Education Asia Limited 2017 2 NSS ICT Compulsory Question Bank
P22M007
Which of the following statements is/are correct?
(1) A constant is a value that can be changed twice during the execution of a program.
(2) Variable is a value that cannot be changed during the execution of a program.
(3) We have to give a name to a variable before using it in a program.
A. (1) only
B. (2) only
C. (3) only
D. (1), (2) and (3)
P22M008
Which of the following can be used to store the name of a person?
A. Character
B. Boolean
C. Real
D. String
P22M009
Which of the following is not a good user interface design?
A. Use black background with brown fonts to display the content.
B. Perform form field validation after a form is submitted.
C. Use radio buttons and drop-down selection boxes to control objects appropriately.
D. Use the same colour scheme and similar wordings for labels and text on all forms of the
interface.
P22M010
Which of the following statements is not correct?
A. An integer can be used in calculations.
B. A character can be used to store a digit.
C. A string is a collection of characters.
D. An array is a collection of variables of different data types.
© Pearson Education Asia Limited 2017 3 NSS ICT Compulsory Question Bank
P22M011
Which of the following logical operations matches with the truth table below?
p q Result
True True True
True False False
False True False
False False False
A. p AND q
B. p OR q
C. NOT p
D. None of the above
P22M012
Which of the following logical operations matches with the truth table below?
p q Result
True True False
True False False
False True True
False False True
A. p AND q
B. p OR q
C. NOT p
D. None of the above
P22M013
Which of the following may be included in the input requirements of a problem?
(1) Data types
(2) Precision levels
(3) Units
A. (1) only
B. (2) only
C. (2) and (3) only
D. (1), (2) and (3)
P22M014
Given that x = 10 and y = 20, which of the following logical expressions is true?
A. x > 20
B. (y < 40) AND (x < 5)
C. (x + y) < 40
D. (x – y) > 0
P22M015
Given that x = 10 and y = 20, which of the following shows the output of the
pseudocode below?
Input x, y
IF x > 20 THEN
P22M016
What is the advantage of using pseudocodes over using flowcharts?
A. Pseudocodes can present algorithms by graphical form.
B. Pseudocodes can be translated into machine language directly by computers
while flowcharts cannot.
C. Pseudocodes can analyze problems while flowcharts cannot.
D. Pseudocodes can be converted into computer language more easily.
P22M018
What does the following flowchart symbol represent?
A. Decision box
B. Input / output box
C. Predefined process box
D. Process box
P22M019
Which of the following flowchart symbols indicates that a decision is going to be
made in an algorithm?
A.
B.
C.
D.
P22M020
Which of the following flowchart symbols indicates that an input / output process is
required in an algorithm?
A.
B.
C.
P22M022
Which of the following can be used for problem analysis?
(1) IPO diagram
(2) Flowchart
(3) Pseudocode
A. (1) only
B. (2) only
C. (2) and (3) only
D. (1), (2) and (3)
P22M023
Which of the following statements about IPO chart is correct?
A. It can be used in dry run.
B. It can be used to analyze problems.
C. It can be used to replace flowcharts.
D. It can be used to identify problems.
P22M024
Which of the following is not the common symbol used for drawing flowchart?
A.
B.
C.
D.
P22M025
What does the following flowchart symbol represent?
P22M027
Which of the following is/are correct when selecting data types for variables?
(1) Select numeric data for phone numbers or account numbers.
(2) Select logical data for True or False decisions.
(3) Select string for names or addresses.
A. (1) only
B. (1) and (2) only
C. (2) and (3) only
D. (1), (2) and (3)
P22M028
Which of the following Boolean expressions can validate the height and weight of an
adult? It is given that the variables of height and weight are H (in cm) and W (in kg)
respectively.
A. (H > 70 or H < 250) or (W > 25 or W < 400)
B. (H > 70 or H < 250) and (W > 25 or W < 400)
C. (H > 70 and H < 250) and (W > 25 and W < 400)
D. (H > 70 and H < 250) or (W > 25 and W < 400)
P22M030
Which of the following statements about well-designed layout of a user interface
is/are correct?
(1) Use different colours for different text
(2) Consistent alignment of fields
(3) Use long and flash wording
A. (1) only
B. (2) only
C. (3) only
D. (1), (2) and (3)
P22M031
Which of the following pairs of variables and data types is/are correct?
Variable Data type
(1) Age Character
(2) HKID_number Integer
(3) Name String
A. (1) only
B. (2) only
C. (3) only
D. (1), (2) and (3)
P22M033
Which of the following logical expressions is TRUE?
A. (True AND False) OR (NOT(True) OR False)
B. NOT(True) AND NOT(False OR True)
C. NOT(False) OR (True AND False)
D. NOT(True) OR (True AND False)
P22M034
Study the following pseudocode.
X 1
Y 9
Input Z
IF (Z > X) AND (Z < Y) THEN
Output 'A'
ENDIF
IF (Z >Y) OR (Z < X) THEN
Output 'B'
ENDIF
IF (Z > X) AND (Z > Y) THEN
Output 'C'
P22S001
(a) What is an algorithm?
(2 marks)
(b) State the name of two common methods of representing an algorithm.
(2 marks)
(c) Explain the key difference between these two representations.
(2 marks)
P22S002
(a) State three considerations when designing a good user interface.
(3 marks)
(b) Besides layout design, state three considerations when building a user-friendly
user interface.
P22S003
Fill in the missing entries below to complete the truth table of ‘(x AND y) OR
(NOT x AND NOT y)’.
x y x AND y NOT x NOT y NOT x AND (x AND y) OR
NOT y (NOT x AND NOT
y)
True True
True False
False True
False False
P22S004
Name the data types / data structures for the following constants.
Constant Data type / data structure
‘ABC’
100.01
‘F’
-30
True
‘$’
(6 marks)
P22S005
Suppose x = 11, y = ‘A’, z = True. Evaluate the following logical expressions.
Logical expression Result
(x > 10) AND z
(Y = ‘A’) AND (NOT z)
(y <> ‘A’) OR (x < 11)
z AND (x > 20) AND (y = ‘A’)
(NOT z) OR (x <> 11) OR (y = ‘B’)
(x > -1) AND (y = ‘A’) AND z
P22S008
Given the following pseudocode of a program:
© Pearson Education Asia Limited 2017 NSS
12 ICT Compulsory Question Bank
Input NUM1, NUM2
TEMP NUM + NUM2
TEMP TEMP / 2
OUTPUT TEMP
(a) If we input NUM1 = 10 and NUM2 = 30, what will be the output of this
program?
(1 mark)
(b) What is the purpose of this program?
(1 mark)
(c) Transform it into a flowchart.
(4 marks)
P22S009
May writes a program to allow the user to input an integer. The program will calculate
the sum of 4 successive numbers increased by 2.
The following shows the pseudocode:
10 Input NUM
20 Sum NUM
30 Sum NUM + 2
40 Sum NUM + 2
50 Sum NUM + 2
60 Output NUM
(a) The algorithm cannot display the required result. Correct the above pseudocode.
(1 mark)
(b) Mary thinks that the algorithm is clumsy. Simplify the program to only 3 lines.
(2 marks)
(a) Point out four major changes and improvements that should be carried out.
(4 marks)
(b) Suggest two form field validations that should be performed right after the form
is submitted.
(2 marks)
P22S012
Fill in the truth table for the following logical expression.
(NOT A AND B) OR NOT B AND (A OR B)
(NOT A AND B)
NOT A
A B NOT A NOT B A OR B OR NOT B AND (A
AND B
OR B)
True
True
False
False
(6 marks)