Font size
WorksheetsTopical Test 2- Approach in problem solving
Total questions: 20
Worksheet time: 10mins
What is IPO stands for?
Input, Product, Output
In, Process, Out
Input, Process, Output
Look at the picture and identify the Output.
Oven
Cake
Eggs
Milk
A program that will accept student’s mark. If the mark is greater than 40, print the message “PASS”.
Identify process.
message "PASS"
determine the appropriate message based on mark
determine the mark based on the respective message
student's mark
A program that will accept student’s mark. If the mark is greater than 40, print the message “PASS”.
Identify input.
message "PASS"
determine the appropriate message based on mark
student's mark
If an employee works more than 40 hours a week, compute his overtime pay which is half of his salary.
Identify output
hour
overtime pay
week
salary
If an employee works more than 40 hours a week, compute his overtime pay which is half of his salary.
Identify process
determine calculate overtime pay based on hour and salary
calculate overtime pay based on employee
determine overtime pay based on week
determine and calculate overtime pay based on overtime pay
If a student’s mark is greater than 40, print the message “PASS”. Otherwise, print the message “FAIL”.
Identify input
students
mark
40
A program that will accept two numbers from user. Display a message “First number is bigger” if first number is bigger than second number. Otherwise display a message “Second number is bigger”.
Which of the following are input
two numbers
number 1, number 2
respective number 1
respective number 2
Create a program to calculate the price after 10% discount.
Which answer is the process of the problem given?
calculate the price before discount
calculate the price to pay
calculate the discount
calculate the total price and discount
Calculate and display the overtime pay received by an employee. Overtime rate is RM5 per hour.
Which answer is the input to the problem given?
hour
overtime pay
hour,
overtime pay
State the first step in Problem Solving.
Documentation
Design Solution
Problem Analysis
Testing
Implementation
State the fourth step in Problem Solving.
Documentation
Design Solution
Problem Analysis
Testing
Implementation
A government tax of 6% will be added to the price of a set of meal bought at restaurant McJ. Calculate total price that Zul has to pay for a set of meal.
Identify process.
total price for a set of meal
calculate total price for a set of meal
total price = price of a set of meal + (0.06 x price of a set of meal)
0.06 government tax
A program will read two numbers and print their total and average.
Which of the answer below are output for the program.
average and total of two numbers
number 1
number 2
calculate total and average of two numbers
Athirah sells computer brand A which is RM1000 per unit and computer brand B which is RM2000 per unit. She will be given 10% commission for her total sales. Calculate total sales she will get.
Identify input.
total sales
quantity brand A, quantity brand B
calculate total sales
10 % commission
Choose 3 types of error.
Syntax error
Logic error
Run time error
Coding error
Print the squares of 10 numbers entered by user.
Identify the process
Calculate 10 squares
Determine squares based on number
Repeat number and calculate squares
Repeat number and calculate squares for 10 times
Calculate BMI for 21 students.
Identify input
BMI
21 students
Height and Weight
The program will calculate average for a few integers entered by users. The user should key in 0 to terminate the process.
Choose the suitable control structure.
Selection
Counter controlled
Sequence
Sentinel controlled
Calculate the average of a few student height. The value -1 for height indicates the end of input.
Identify the process
Determine and calculate the average based on height
Repeat height and calculate average for -1 times
Repeat height and calculate average until height = -1
Calculate average based on height for many times
