You are on page 1of 14

Chapter 12 Problem Solving Procedures Question Bank

Chapter 12 Problem Solving Procedures


Multiple Choice Questions

(U01C12L01Q001)
Which of the following can be used for problem analysis?
(1) IPO diagram
(2) flow chart
(3) pseudocode
A. (1) only
B. (2) only
C. (2) and (3) only
D. (1), (2) and (3)
Answer
A

(U01C12L01Q002)
Problem solving procedures include:
(1) developing a solution
(2) algorithm design
(3) problem identification
A. (1) and (2) only
B. (1) and (3) only
C. (2) and (3) only
D. (1), (2) and (3)
Answer
D

(U01C12L01Q003)
We need to add comments when writing a program because
(1) computer cannot translate programs that do not have comments.
(2) adding comments may help the program easier to read.
(3) comments may help reduce the file size of object program.
A. (1) only
B. (2) only
C. (1) and (2) only
D. (1) and (3) only
Answer
Computer & Information Technology for HKCEE 1 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

Computer & Information Technology for HKCEE 2 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

(U01C12L01Q004)
Arrange the following problem solving procedures in the correct order.
(1) algorithm design
(2) debugging and testing
(3) problem analysis
(4) problem identification
(5) developing a solution
A. (4), (3), (1), (2), (5)
B. (4), (3), (1), (5), (2)
C. (3), (4), (1), (5), (2)
D. (3), (4), (1), (2), (5)
Answer
B

(U01C12L01Q005)
Which of the following problem solving procedures involves the work of “breaking
down the problem into sub-problems”?
A. algorithm design
B. debugging and testing
C. problem analysis
D. problem identification
Answer
C

(U01C12L01Q006)
Which of the following problem solving procedures involves the work of “designing
the step-by-step procedures of solving a problem”?
A. algorithm design
B. debugging and testing
C. problem analysis
D. problem identification
Answer
A

Computer & Information Technology for HKCEE 3 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

(U01C12L01Q007)
What should be done in the solution development stage of solving a problem?
A. Identify what the problem actually is.
B. Design the step-by-step procedures of solving a problem.
C. Realise the algorithm designed by practical means to form a solution.
D. Prepare documents that describe the solution.
Answer
C

(U01C12L01Q008)
Which of the following statements about stepwise refinement is correct?
A. It is a common problem analysis method of breaking down a complicated
problem in a series of steps.
B. It is used to show the modular structure of a problem and the relationship
between modules.
C. It is used to find out and remove all possible errors in the solution.
D. It is a set of step-by-step procedures which solves a specific problem in a finite
number of steps.
Answer
A

(U01C12L01Q009)
Which of the following can be used to express an algorithm?
(1) flowchart
(2) pseudocode
(3) HTML source code
A. (1) only
B. (3) only
C. (1) and (2) only
D. (1), (2) and (3)
Answer
C

Computer & Information Technology for HKCEE 4 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

(U01C12L01Q010)
What is the following flowchart symbol?

A. decision box
B. terminal box
C. predefined process box
D. process box
Answer
D

(U01C12L01Q011)
What is the following flowchart symbol?

A. decision box
B. terminal box
C. predefined process box
D. process box
Answer
B

(U01C12L01Q012)
What is the following flowchart symbol?

A. decision box
B. input/output box
C. predefined process box
D. process box
Answer
C

Computer & Information Technology for HKCEE 5 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

(U01C12L01Q013)
Which of the following is the key factor that will affect the efficiency of a particular
method for solving a problem?
A. number of steps in the algorithm designed
B. number of steps that will be carried out during the execution of the solution
C. the exact wordings of the algorithm designed
D. the length of each step in the algorithm designed
Answer
B

(U01C12L01Q014)
Which of the following flowchart symbols indicates that a decision is to be made in
an algorithm?

A.

B.

C.

D.

Answer
C

Computer & Information Technology for HKCEE 6 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

(U01C12L01Q015)
Which of the following flowchart symbols indicates that an input/output process is
required in an algorithm?

A.

B.

C.

D.

Answer
B

Computer & Information Technology for HKCEE 7 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

Conventional Questions

(U01C12L02Q001)
Linda prepares to design a program to determine whether the test mark of a subject is
pass or not. Her algorithm is shown below:

BEGIN
Input Mark1
Input Mark2
Average = (Mark1 + Mark2) / 2
If Average ≥ 50
Then Result = Pass
Else Result = Fail
Print Result
END

(a) (i) Which kind of control structure has the above algorithm used? (1 mark)
(ii) Besides the above structure, state TWO other kinds of control structure.
(2 marks)
(iii) Sketch a flowchart to demonstrate the above algorithm. (4 marks)
(iv) What is the next step to be done after completing the algorithm design?
(1 mark)
Before designing the algorithm in (a), Linda has drawn an IPO diagram.
(b) (i) What is the use of an IPO diagram? (1 mark)
(ii) Sketch the corresponding IPO diagram before designing the algorithm in
(a).
(3 marks)

Computer & Information Technology for HKCEE 8 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

Answers
(a) (i) selection control structure (1)
(ii) sequence (1), iteration (1)
(iii)

BEGIN

Input Mark1, Mark2

Average = (Mark1 + Mark2) / 2

True False
Average ≥ 50? (4)

Result = Pass Result = Fail

Print Result

END

(iv) coding (1)


(b) (i) Identify the inputs, outputs and processing of the problem. (1)
(ii)
Input Process Output
Input 1, Input 2 Assign (Mark1+Mark2) / 2 to Average Print Result
(1) (0.5); (1)

If Average ≥ 50, then assign “Pass” to


Result; else assign “Fail” to Result (0.5)

Computer & Information Technology for HKCEE 9 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

(U01C12L02Q002)
In order to increase productivity of staff and improve customer services, an electronic
products company plans to renew its existing computer system. The company will
appoint some system analysts for the system upgrade.
(a) System analysts have to identify the problem before renewing the computer
system. State ONE reason of taking this step. (1 mark)
(b) State a tool that may be used by a programmer for problem analysis. (1 mark)
(c) (i) State TWO tools that may be used for algorithm design. (2 marks)
(ii) What should a programmer be aware when designing algorithm? State
TWO of these items. (2 marks)
Programmers have to conduct debugging and testing when designing a program.
(d) State ONE difference between debugging and testing. (2 marks)
(e) State TWO types of errors that may be presence in designing programs. Give an
example to each type. (2 marks)
Programmers have to write program documents after designing a program.
(f) State ONE reason for documentation. (1 mark)
(g) State ONE type of program documents. (1 mark)
Answers
(a) Guarantee the finished system satisfies the users’ need. (1)
(b) IPO diagram
(c) (i) pseudocode (1), flowchart (1)
(ii) Algorithm should be clear enough so as to reduce logic errors. / Each step in
the algorithm must be defined correctly. / Make sure the algorithm will stop
in a finite number of steps. (Any 2 × 1)
(d) Debugging: locating and fixing the defects in a program (1); Testing: the process
of showing the presence of errors. (1)
(e) syntax error: misspell of program statements / omission of punctuation marks
run-time error: divide by zero error
logic error: the age has negative value
(type of error: 0.5 + 0.5, example of error: 0.5 + 0.5)
(f) The program can be reused. / Users may know the program data from the
documents. / Other programmers may need to maintain the program or make
amendments on it. (Any 1 × 1)
(g) program manual / reference manual (Any 1 × 1)

Computer & Information Technology for HKCEE 10 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

(U01C12L02Q003)
Read the problem identification below.
There are two brands of soft drinks. Brand A is larger in volume but more
expensive than Brand B. A person wants to determine which brand of soft drink
is more economical.
(a) Identify the inputs and outputs of the following problem. (5 marks)
(b) Design an algorithm in pseudocode to solve the problem. (7 marks)
Answers
(a)
Input Type
Volume of Brand A soft drinks Number
Price of Brand A soft drinks Number
Volume of Brand B soft drinks Number
Price of Brand B soft drinks Number
(4)
Output Type
“Brand A is more economical.” or Text

“Brand B is more economical.”

(1)
(b) Input volume of Brand A
Input price of Brand A
Input volume of Brand B
Input price of Brand B
unit price of Brand A = price of Brand A ÷ volume of Brand
A
unit price of Brand B = price of Brand B ÷ volume of Brand
B
If unit price of Brand A > unit price of Brand B
Then output = “Brand B is more economical”
Else output = “Brand A is more economical”
Print output
(inputs: 0.5 × 4; compute unit prices of Brand A and Brand B: 2; selection control
structure: 2; output: 1)

Computer & Information Technology for HKCEE 11 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

(U01C12L02Q004)
(a) A program is written to find the roots of an equation Ax2 + Bx + C = 0. Identify
the necessary inputs to and expected outputs from the program. State the types of
inputs and outputs. (6 marks)
The block diagram below shows the structure of a program which is used to calculate
the daily wages of different workers.
D a ily W a g e s

A C a lc u la te F
D a ily
W ages

In p u t B C a lc u la te F in d o u t E
W o rk in g H o u r B a s ic W a g e s O v e rtim e
W ages

C D

(b) Complete the block diagram by matching the following with the modules A – F.
(6 marks)
(i) Calculate Overall Wages
(ii) Calculate Overtime Wages
(iii) Input Working Hour and Hourly Wages
(iv) Output Daily Wages
(v) Calculate Overtime Hours
(vi) Input Hourly Wages
Answers
(a)
Inputs Type
2
Coefficient of x (i.e. A) (0.5) Number (0.5)
Coefficient of x (i.e. B) (0.5) Number (0.5)
Constant term (i.e. C) (0.5) Number (0.5)

Outputs Type
One root of the equation (0.5) Number (0.5)

OR
Two roots of the equation (0.5) Number (0.5)
OR
“No real root”(0.5) Text (0.5)

Computer & Information Technology for HKCEE 12 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

(b) (i) E (1)


(ii) D (1)
(iii) A (1)
(iv) F (1)
(v) C (1)
(vi) B (1)

(U01C12L02Q005)
(a) State the differences between an algorithm and a program. (2 marks)
Read the problem identification below.
Find out the more economical one between the two brands of orange juice.
(Brand A and Brand B) with different volumes and prices.
(b) Identify the inputs and outputs of the problem. (3 marks)
The block diagram below shows the structure of a program which is used to find
which brand is more economical.

M o re e c o n o m ic a l
b ra n d

In p u t d a ta A B

C D E F G

(c) Complete the diagram by matching the letters with the modules below. (2 marks)
(i) Calculate unit price in $/mL of each brand
(ii) Display the brand with a lower unit price
(iii) Find out the more economical brand
(iv) Find out the brand with a lower unit price
(v) Get volume and price of Brand A
(vi) Get volume and price of Brand B
(vii) Output data
(d) Write down the algorithm of “Find out the brand with a lower unit price” using
selection control structure. (2 marks)
(e) Design an algorithm in pseudocode to solve the problem. (3 marks)

Computer & Information Technology for HKCEE 13 © Pearson Education Asia Limited 2004
(Core Module)
Chapter 12 Problem Solving Procedures Question Bank

Answers
(a) An algorithm is the design of a solution, it shows the step-by-step procedures to
solve a problem. (1) A program is the instruction sets which are converted from
an algorithm. The instruction sets tell the computer to complete tasks step-by-
step. (1)
(b) Input: Volume and price of Brand A (1)
Volume and price of Brand B (1)
Output: The more economical brand (1)
(c) (i) E
(ii) G
(iii) A
(iv) F
(v) C
(vi) D
(vii) B (all correct: 2)
(d) If unit price of Brand A < unit price of Brand B (1)
then Brand A has a lower unit price (0.5)
else Brand B has a lower unit price (0.5)
(e) Input volume and price of Brand A
Input volume and price of Brand B
Compute unit price in $/mL of Brand A
Compute unit price in $/mL of Brand B
If unit price of Brand A < unit price of Brand B
then Brand A has a lower unit price
else Brand B has a lower unit price
Print the brand with a lower unit price
(input volume and price: 1; compute unit price: 1;
selection control structure: 0.5; Output: 0.5)

Computer & Information Technology for HKCEE 14 © Pearson Education Asia Limited 2004
(Core Module)

You might also like