wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PSPD REVISION

Total questions: 66

Worksheet time: 37mins

Name
Class
Date
1.
In designing an algorithm to find the average height of three boys. What will be the input?
a)
The height of the boys
b)
The value of the height of the three boys
c)
Read the height of the boys
d)
The average
2.
In designing an algorithm to find the average height of three boys. What will be the Output?
a)
Read the value of the height of the boys
b)
the average height
c)
sum of the height
d)
value of the height of the boys
3.
In designing an algorithm to find the average height of three boys. What will be the processed?
a)
None of them are correct
b)
average height
c)
sum of height divided by 3
d)
height of the three boys
4.
A set of instruction that enable you to solve a problem is called problem solving.
a)
True
b)
False
5.
A variable name can begin with any character.
a)
True
b)
False
6.
If - Else is considered a conditional statement.
a)
True
b)
False
7.
Writing comments about a program works is called ____________
a)
Implementation
b)
Defining
c)
Documentation
d)
Test and Verify
8.
A piece of data that can be changed is called _____________
a)
Keyword
b)
Read
c)
Constant
d)
Variable
9.
 Part of a program is repeated by a _______________.
a)
Loop
b)
Variable
c)
Statement
d)
Keyword
10.
 Pascal,basic and C+ are all _______________
a)
computer program
b)
programming language
c)
windows software
d)
foreign language
11.
Two types of errors that must be avoided when implementing a program are___________
a)
Syntax and logical error
b)
Problem solving and Programming Error
c)
Logical and debugging Error
d)
none of these
12.

1. First generation language is also known as __________________.

a)

Machine language

b)

Symbolic language

c)

Mnemonic language

d)

Assembly language

13.

Programming language is _____________________________

a)

A process or person who writes the program.

b)

A set of step-by-step instructions performed to solve a particular problem.

c)

A planning process for a sequence of instruction to be executed by the computer.

d)

A set of rules and reserved words that can be used to tell a computer what are the operations to be done.

14.

What is the output based on the pseudo code given if the value for Quiz1=6, Quiz2=8 and Quiz3=10?


Start

Input Quiz1, Quiz2, Quiz3

Total = Quiz1 + Quiz2 + Quiz3

Result = Total / 3

Output Result

End

a)

8

b)

24

c)

0

d)

16

15.

State the best output for ATM machine transaction system.

a)

Choose language

b)

Print receipt

c)

Enter pin number

d)

Enter amount of money to withdraw

16.

If x=3, y=10, and z=2, find the value of W


W=((x*y)==(y/z))||((y==0)&&((x+z) !=y))

a)

3

b)

2

c)

1

d)

0

17.

Based on the Figure below, determine the output if the input mark is 80


if (mark>80)

display result (“Congratulation!”)

else

display result (“Try Again”)

a)

Try Again

b)

Congratulation and Try Again

c)

Congratulation!

d)

Try Again!

18.

The workers salary of an electronic factory are paid by the number of hours worked, which is RM 2.50 per hour. Total income earned will be cut by 10% for their contributions. Calculate the net income earned by an employee.


What are the inputs for the above problem?

a)

RM 2.50 per hour

b)

10% for their contribution

c)

Electronics factory workers

d)

The number of hours worked

19.

“All the collection of information will be used into this phase to design a flowchart and pseudo code”


Which phase is involved in the statement?

a)

Implement the algorithm

b)

Design the algorithm to solve the problem

c)

Maintain and update the program

d)

Test and verify the completed program

20.

As a payroll officer, you are required to calculate the salary of the workers. The salary include a basic salary and overtime payment. The overtime payment will be calculated based on the number of hours work, where 1 hour=RM20. Display the total salary of the workers.


What is the suitable formula that shows the process ?

a)

Overtime=hour_work*20;

Salary=basic_salary+overtime;

b)

Overtime=hour_work*20;

Salary=overtime;

c)

Salary=basic_salary+overtime;

d)

Salary=basic_salary+20;

21.

Search the best answer to describe a compiler.

a)

It can translate assembly language to machine language

b)

It does a conversion line by line as the program is running

c)

It is general purpose language providing very efficient execution

d)

It coverts whole of a higher level program code into machine code in one step

22.

Recognize the translator used to translate C++ into the machine language.

a)

Compiler

b)

Interpreter

c)

Syntax

d)

Assembler

23.

There are ……………… phases in programming life cycle.

a)

Six

b)

Five

c)

Seven

d)

Eight

24.

Which of the following is the CORRECT arrangement for maintenance of a program?

i. Adjustment

ii. Measurement

iii. Testing

iv. Replacement

a)

ii, iii, iv and i

b)

iv, i, iii and ii

c)

iii, ii, i and iv

d)

i, ii, iii and iv

25.

Based on the statement below , identify the phase in problem solving concept.


“Process of entering data, program and instructions into the computer system using input devices”

a)

Input

b)

Process

c)

Output

d)

Planning

26.

Based on the statement below, choose the correct phase involved in Programming Life Cycle.


· This stage is the general definition of the task

· It includes the specification of inputs and outputs, processing requirements, system constraints, and error handling methods

a)

Specify the problem

b)

Analyze the problem

c)

Design the algorithm

d)

Maintain and update the program

27.

Identify THREE (3) major tasks in the phase Analyse the Problem


i. Review the requirements

ii. Meet with system analyst and users

iii. Identify input, processing, output and data components

iv. Coding a program involves translating the solution algorithm

a)

i, ii and iii

b)

i,ii and iv

c)

i,iii and iv

d)

ii,iii and iv

28.

Among the list below, identify which is NOT involve in phase Maintain and Update the Program.

a)

Measurement

b)

Updating

c)

Adjustment

d)

Relocation

29.

Consider the following codes:

Begin Line 1

sum = 0 Line 2

input num1, num2, num3 Line 3

sum = num1+num2 +num3 Line 4

Print “Your total is”, sum

End If num1 = 8, num2 = 7, num3 = 9; and the codes were executed as is what would be the result:

a)

Your total is 24

b)

Your total is sum

c)

"Your total is", 24

d)

"Your total is 24"

30.

Which data type is used to store:

100

a)

Integer

b)

Double

c)

Boolean

d)

String

31.

Which data type is used to store:

TRUE

a)

Boolean

b)

Double

c)

String

d)

Integer

32.
This data type is used to store whole numbers
a)
Integer
b)
Double
c)
Boolean
d)
String
33.
This data type is used to store a mixture of letters and numbers and symbols.
a)
String
b)
Character
c)
Boolean
d)
Integer
34.

What is a variable?

a)

A storage location of memory which can change

b)

A random area to store things in.

c)

Something that changes

d)

Something that can only store numbers

35.
What data type would be best used to record the number of people at a party?
a)
Integer
b)
Real
c)
String
d)
Boolean
36.
Integers cannot store negative numbers.
a)
False
b)
True
37.
What data type would be best used to record an email address?
a)
String
b)
Integer
c)
Real
d)
Character
38.
What data type would be the answer to the expression x < 5?
a)
Boolean
b)
Character
c)
Real
d)
String
39.

What type of data would you store your age in years?

a)

Real

b)

Integer

c)

String

d)

Boolean

40.

What data type would you store a vehicle's registration plate?

a)

Real

b)

String

c)

Boolean

d)

Integer

41.

Which value is a String?

a)

64

b)

"cat"

c)

True

d)

0.5

42.

What is an Integer?

a)

A data type that contains whole numbers. eg: 3, 45, 124

b)

Numbers with decimal point. eg: 0.5, 2.45, 56.04

c)

Group of characters between quotation marks. eg: "dog"

d)

Data type that can only be True or False.

43.

Which data type is used to store:

"&"

a)

Character

b)

String

c)

Integer

d)

Real

44.

What data type would you use to record someone's height so that it could be used in a calculation?

a)

Text

b)

String

c)

Numeric

d)

Boolean

45.
Variables and constants in programs need to be assigned a data type.
a)
True
b)
False
46.
What is this operator? *
a)
addition
b)

subtraction

c)
multiplication
d)
division
47.
What is this operator? /
a)
addition
b)
subtraction
c)
remainder
d)
division - only the whole number
48.
What is this operator? <
a)
Greater than
b)
Less than or equal to
c)
Less than
d)
Greater than or equal to
49.
What is this operator? >=
a)
Greater than
b)
Less than or equal to
c)
Less than
d)
Greater than or equal to
50.
What is this operator? %
a)
Concatenation
b)
Remainder or mod
c)
Division - only the whole number
d)
Escape character
51.
What is this operator? &&
a)
and
b)
or
c)
Remainder or mod
d)
Multiplication
52.
What is this operator? !
a)
and
b)
or
c)
not
d)
equal to
53.
Comparison Operators
What is != ?
a)
Equal to
b)
Equal value and equal type
c)
Not equal
d)
Not equal value or not equal type
54.

Fill in the blank to get 1 outputted from this code:


int main() {


int a = 2;

int b = 13;


cout<< b _ a <<endl;


}

(a)  

55.

True or False. This code will output 0


cout<< 23 % 2 <<endl;

a)

True

b)

False

56.

Fill in the blank to get 0 outputted from this code:


int main() {


cout<< 12 ___ 12 <<endl;


}

a)

-

b)

+

c)

==

d)

%

57.

What is the only function that all C++ programs must contain?

a)

start()

b)

system()

c)

main()

d)

program()

58.

Which command in C++ moves the text to the next line?

a)

\t

b)

\n

c)

\r

d)

\s

59.

What is the extension of C++ programs?

a)

.c

b)

.css

c)

.cpp

d)

.jsp

60.

Which syntax is correct in printing an output in a C++ program?

a)

print<<"Good Day!";

b)

cout<<"Good Day!";

c)

printf<<"Good Day!";

d)

cout<<"Good"<<"Day!";

61.

Insertion operator (<<) is used with?

a)

cin

b)

cout

c)

both of the above

d)

main

62.

Which of the following correctly shows the hierarchy of arithmetic operations in C?

a)

/ + * -

b)

* - / +

c)

+ - / *

d)

/ * + -

63.

Which of the following is not logical operator?

a)

&

b)

&&

c)

||

d)

!

64.

When does the code block following while(x<100) execute?

a)

When x is less than one hundred

b)

When x is greater than one hundred

c)

When x is equal to one hundred

d)

while it wishes

65.

Input/output function prototypes and macros are defined in which header file?

a)

conio.h

b)

stdlib.h

c)

iostream.h

d)

stdio.h

66.

Which of the following is not a correct variable type?

a)

int

b)

real

c)

float

d)

char