wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CS Prelim I

Total questions: 28

Worksheet time: 20mins

Name
Class
Date
1.

State the standard algorithm used in a program above?

a)

Traversing an array

b)

Input Validation

c)

Running Total

d)

Variable Assignment

2.

There are 20 pupils in N5 Computing class. The teacher wants to use a loop to enter the pupils' marks into a program. State the type of loop that the teacher would use and explain why.

a)

Fixed loop, because the teacher would type only 20 marks for 20 pupils in his class.

b)

Conditional loop, because the Teacher will finish typing the marks in after the last pupil.

c)

Fixed loop because it will repeat the code only for a certain amount of time.

d)

Conditional loop because the code will be repeated until the condition is met.

3.

Explain what is a wireframe used in program design?

a)

The wireframe shows the user how the program might look at the end of the process.

b)

It is used to plan the location of elements/objects used and the overall layout of the user interface.

4.

Software developers often have to return to the implementation stage of an iterative development process following the testing stage. Explain why this is.

a)

Correct any errors encountered and identified during the testing stage and modify the code accordingly.

b)

To add extra features into the code which were proposed to be added after the test runs.

c)

In case of any errors.

d)

To make changes.

5.

Explain how a bit mapped graphic is saved in computer's memory?

a)

Bit-mapped graphics are stored in a computer's memory as a map of the grid.

b)

Each grid is called a pixel, which is represented by the binary value stored as 1s and 0s.

c)

Every pixel has a binary value assigned, which represents the colour it holds.

d)

Map of pixels with bits.

6.

State the part of the processor that temporarly stores pupils' grade.

a)

Registers

b)

Arithmetic and Logic Unit

c)

Control Unit

d)

Data Bus

7.

State the part of the processor that calculates the average grade.

a)

Registers

b)

Arithmetic and Logic Unit

c)

Control Unit

d)

Address Bus

8.

When executing the program it is translated into binary. Why does a high-level language need to be translated into binary?

a)

A high-level language is a language used and recognized by humans.

b)

The program is translated into machine code for the computer to understand the code, as the only values it can recognize are 1s and 0s.

c)

It is the only thing computer understands.

d)

Computer only read machine code.

9.

Describe one advantage of using an interpreter and one advantage of using a compiler when translating code.

a)

The interpreter translates one line of code at a time, and as soon as it encounters the error - it is communicated to the user.

b)

The interpreter translates one line of code a time and communicates the presence of an error as soon as it is encountered allowing for the quick fix of errors and preventing replicating them.

c)

The compiler runs faster than the translator as it only translates the program once and saves it as an object code.

d)

When using compiler, the code itself is not needed to run the program because the translation of code and execution code are two separate processes.

10.

Explain how a bit-mapped graphic is saved in the computer's memory.

a)

Bit mapped graphics are being stored in a computer's memory as a map of grid.

b)

Each grid is called pixel which is represented by the binary value stored as a 1s and 0s.

c)

Every pixel has a binary value assigned which represent the colour it holds.

d)

Map of pixels with bits in it.

11.

Software developers often have to return to the implementation stage of an iterative development process following the testing stage. Explain why this is.

a)

Correct any errors encountered and identified during the testing stage and modify the code accordingly.

b)

To add extra features into the code which were proposed to be added after the test runs.

12.

Explain what wireframe is used for in program design.

a)

The wireframe is used to show the user how the program might look at the end of the process.

b)

It is used to plan the location of elements/objects used and the overall layout of the user interface.

c)

Prototyping

13.

State the design technique used?

a)

Flowchart

b)

Structure Diagram

c)

Pseudocode

d)

An array

14.

Explain how a variable is different than an array?

a)

A variable is a data structure which holds only one data item of a specific data type.

b)

An array is also a data structure, but it holds multiple items, which need to be of the same data type.

15.

Which answer show correct array declaration for the names of 15 customers?

a)

Dim Customers(14) As String

b)

Dim Customers As String

c)

Dim Customers (14) As Integer

d)

Dim Customers(15) As String

16.

The integer data type is used to store values of purchased tickets in variable tickets. Explain why integer data type is being used?

a)

The integer is data type used to store whole numbers only.

b)

Purchased tickets have to be counted and stored as a whole numbers.

c)

It is impossible to purchase 0.5 of a ticket therefore the value for this variable cannot be stored as a decimal number.

d)

Because it's full number.

17.

Each of the letters of the message CLOSED NOW will be stored as an ASCII character. Calculate the number of bits required to store this message.

a)

9 x 8 = 72 bits

b)

10 x 8 = 80 bits

18.

A test data which is outside of the values accepted by the program is called?

a)

Exceptional

b)

Extreme

c)

Execusion

d)

Syntax

19.

Program accepts the numbers between 0 and 9 including both numbers. What type of test data is number 6?

a)

Normal

b)

Extreme

c)

Execution

d)

Exceptional

20.

Program accepts the numbers between 0 and 9 including both numbers. What type of test data is number 9?

a)

Normal

b)

Extreme

c)

Execution

d)

Exceptional

21.

Program accepts the numbers between 0 and 9 including both numbers. What type of test data is number -2?

a)

Normal

b)

Extreme

c)

Execution

d)

Exceptional

22.

When testing the program which accepts string data , “44” is entered. As expected, an error message appears. Explain what type of error is this and why?

a)

Execution

b)

Syntax

c)

The number passed into the program is outside of acceptable values.

d)

The variable which stores text is declared as a string , therefore if the program receives the number 3 (integer data type) instead of the expected string data type it causes the program to crash.

23.

State what design technique has been used?

a)

Pseudocode

b)

Flowchart

c)

Structure Diagram

d)

String Concatenation

24.

State two programming constructs which are used in step 3.1

a)

String Concatenation

b)

Variables

c)

An Array

d)

Input Validation

25.

Which one IS NOT a data type?

a)

String

b)

Integer

c)

Char

d)

Array

26.

Which one IS NOT a data structure?

a)

Running total

b)

Array

c)

Variable

d)

Integer

27.

Which one IS NOT a standard algorithm?

a)

Traversing an array

b)

Running Total

c)

Input Validation

d)

String Concatenation

28.

State the name of a graphic object and select its attributes:

a)

Straight Line.

Line thickness

Line colour

X,Y coordinates

b)

Ellipse

Fill colour,

Outline colour

X,Y coordinates