Professional Documents
Culture Documents
Ch.22 Algorithm Design I - Assignment - Ans
Ch.22 Algorithm Design I - Assignment - Ans
Ch.22 Algorithm Design I - Assignment - Ans
Assignment
A. (2) only
B. (1) and (3) only
C. (2) and (3) only
D. (1), (2) and (3)
A. Flowchart
B. Pseudocode
C. Both flowchart and pseudocode
D. None of the above
A.
B.
C.
D.
A. Input
B. Process
C. Connector
D. Predefined process
1
NLSI Lui Kwok Pat Fong College
Information and Communication Technology (ICT) Ch.22 Algorithm Design (I)
5. 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)
A. Integer
B. Real
C. Variable
D. Character
A. (1) only
B. (2) only
C. (3) only
D. (1), (2) and (3)
A. Character
B. Boolean
C. Real
D. String
2
NLSI Lui Kwok Pat Fong College
Information and Communication Technology (ICT) Ch.22 Algorithm Design (I)
10. Which of the following statements is not correct?
11. 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
12. 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
13. 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)
3
NLSI Lui Kwok Pat Fong College
Information and Communication Technology (ICT) Ch.22 Algorithm Design (I)
14. 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
15. 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
TEMP ß x * x
ELSE
TEMP ß x + x
ENDIF
IF y > 10 THEN
TEMP ß TEMP - y
ELSE
TEMP ß TEMP * y
ENDIF
Output TEMP
A. 0
B. 80
C. 400
D. 2,000
16. Which of the following is not the key consideration when designing the layout of a
user interface?
17. Which of the following data types can be used to store logical data?
A. integer
B. real
C. character
D. Boolean
4
NLSI Lui Kwok Pat Fong College
Information and Communication Technology (ICT) Ch.22 Algorithm Design (I)
18. Find the results of the following logical expressions.
(1) 10 > 2
(2) NOT (10 > 2)
(3) (10 > 2) AND NOT (10 > 2)
A. integer
B. real
C. character
D. Boolean
A. real
B. string
C. character
D. Boolean