wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Paper 2 Revision

Total questions: 120

Worksheet time: 1hrs 9mins

Name
Class
Date
1.

Select all the High-level programming languages ...

a)

Python

b)

C#

c)

PHP

d)

Assembly

2.

Select all the Low-level programming code ...

a)
b)
c)
d)
3.

Select all the types of program translator...

a)

Compiler

b)

Interpreter

c)

Assembler

d)

Parser

4.

What is another name for the original untranslated program code?

a)

Source code

b)

Object code

c)

Machine code

d)

Assembly code

5.

Which of these descriptions is of object code?

a)

the translated source code, which could be machine code or a type of intermediary code such as bytecode

b)

the code written by the programmer in the chosen programming language

c)

binary codes representing the native instructions in the processor's instruction set

d)

low-level code written using mnemonics that represent the machine instructions in a more meaningful form

6.

Choose the BEST word to complete this sentence:


A high-level programming language lets the programmer write code with a large amount of _____________ from the actual machine instructions of the processor.

a)

memory

b)

lines

c)

abstraction

d)

complexity

7.

Choose the BEST word to complete this sentence:


Assembly code uses short, simple codes called ___________ to represent the instructions of a processor's instruction set.

a)

mnemonics

b)

opcodes

c)

acronyms

d)

abbreviations

8.

Choose all the reasons why programming in assembly code is difficult ....

a)

There is only a small range of instructions available to achieve even the largest task

b)

You have to decide how to represent and store ALL the data in the program, even WHERE it is stored in memory

c)

Difficult to debug a program, as a buggy program usually just crashes the computer

9.

Select all the TRUE statements about high-level languages...

a)

They use recognizable English language keywords

b)

They provide libraries of built-in functions for the programmer

c)

Code must be translated into binary machine code before it can be executed

d)

They are difficult to learn

10.

Which form of translator works by translating the entire program code into a separate executable object code version?

a)

Interpreter

b)

Assembler

c)

Compiler

d)

Compressor

11.

Which type of program translator works by translating and executing a program one line at a time?

a)

Interpreter

b)

Assembler

c)

Compiler

d)

Compressor

12.

Which of these are fundamental control structures in any computer program?

a)

branching

b)

sequence

c)

selection

d)

repetition

e)

iteration

13.

A structured approach to programming which involves breaking a large program down into a number of smaller sub-programs is called ...

a)

object orientation

b)

algorithm

c)

decomposition

d)

abstraction

14.

Which of these are valid methods of representing the steps of an algorithm? (select all that apply)

a)

Flowchart

b)

Pseudocode

c)

Program code

d)

English

15.

Which of these are valid reasons for using subprograms to structure a program? (select all that apply)

a)

Fewer lines of code

b)

Can test subprograms independently

c)

Avoids repetition of code

d)

Different programmers can work on different parts of the program

e)

Avoids need to use local variables

16.

Which of these are recognized techniques of Computational Thinking? (select all that apply)

a)

Debugging

b)

Decomposition

c)

Abstraction

d)

Pattern recognition

e)

Brute-force search

17.

Abstraction is a recognised technique of Computational Thinking. Which of these is the best definition of abstraction?

a)

Creating a set of logical steps that when followed achieve a particular task

b)

Breaking a problem down into several layers of smaller and simpler subproblems

c)

The process of removing or hiding unnecessary detail from a problem

d)

Exploiting the recurrence of patterns in data to make processing more efficient

18.

For which algorithm would it be best to use a conditional loop?

a)

Finding largest number in a list

b)

Calculating average of a list of numbers

c)

Counting occurrences of an item in a list

d)

Checking if an item is in a list

19.

For which algorithm would it be best to use an unconditional loop?

a)

Validating username and password

b)

Adding up numbers in a list

c)

Finding first occurrence of a number in a list

d)

Validating user input for date of birth

20.

What would the list [9, 6, 12, 7, 3, 16, 10] look like after one iteration of the Bubble sort algorithm (smallest to biggest)?

a)

[6, 9, 7, 3, 12, 10, 16]

b)

[3, 9, 6, 12, 7, 16, 10]

c)

[3, 6, 7, 9, 10, 12, 16]

d)

[9, 6, 12, 3, 7, 16, 10]

21.

Which is the correct flowchart symbol for input/output?

a)
b)
c)
d)
22.

An algorithm can be presented in which of the following formats?

a)

Tree diagram

b)

Flow chart

c)

Histogram

d)

Instagram

23.

Which of the following is in the data type of integer?

a)

1

b)

1.0

c)

one

d)

"1"

24.

What does this shape represent in a flow chart?

a)

general process

b)

decision

c)

input/output

d)

subroutine

25.

A local variable can only be used within its structure that they are declared in.

(a)  

26.

What will be the output if the input is 5?

a)

The number is Even

b)

The number is odd

27.

What is the missing part of the program in to output hello world?

a)

writeln

b)

input

c)

print

d)

display

28.

Which of the following is a definite loop?

a)

FOR loop

b)

while loop

c)

repeat until loop

d)

do loop

29.

What will LEN("Happy") output ?

a)

1

b)

7

c)

5

30.

local variables have a local scope.

(a)  

31.

A variable is...

a)

A memory location used to store a value that can change.

b)

A memory location used to store a value that cannot change

32.

A constant is...

a)

A memory location used to store a value that can change.

b)

A memory location used to store a value that cannot change

33.

'Sequence' means...

a)

When lines of code only run if a condition is met. e.g. IF, ELIF, ELSE

b)

When lines of code loop e.g. WHILE, FOR

c)

When lines of code runs one line after the other

34.

'Selection' means...

a)

When lines of code only run if a condition is met. e.g. IF, ELIF, ELSE

b)

When lines of code loop e.g. WHILE, FOR

c)

When lines of code runs one line after the other

35.

'Iteration' means...

a)

When lines of code only run if a condition is met. e.g. IF, ELIF, ELSE

b)

When lines of code loop e.g. WHILE, FOR

c)

When lines of code runs one line after the other

36.

A STRING is...

a)

A TRUE/FALSE or YES/NO value

b)

A word, or number not used in Maths.

c)

A whole number

d)

A number with a decimal point

37.

An INTEGER is...

a)

A TRUE/FALSE or YES/NO value

b)

A word, or number not used in Maths.

c)

A whole number

d)

A number with a decimal point

38.

A FLOAT is...

a)

A TRUE/FALSE or YES/NO value

b)

A word, or number not used in Maths.

c)

A whole number

d)

A number with a decimal point

39.

A BOOLEAN value is...

a)

A TRUE/FALSE or YES/NO value

b)

A word, or number not used in Maths.

c)

A whole number

d)

A number with a decimal point

40.

The data value 'Steve' would be a...

a)

STRING

b)

INTEGER

c)

FLOAT

d)

BOOLEAN

41.

The data value 'Phone Number: 07284 281837' would be a...

a)

STRING

b)

INTEGER

c)

FLOAT

d)

BOOLEAN

42.

SQL statements always use...

a)

WHERE

FROM

SELECT

b)

SELECT

FROM

WHERE

c)

FROM

SELECT

WHERE

d)

SELECT

WHERE

FROM

43.

The examples of maintainability below are... (select 3):

a)

Comments in code

b)

Indentation

c)

Appropriate variable names

44.

Testing an input and ensuring it is in the correct format or range

a)

Input Sanitation

b)

Input Validation

c)

Input Creation

d)

Input Testing

45.

A syntax error means...

a)

An error that still allows the code to run, however not as expected.

b)

An error that prevents the code from running as it does not follow the code language rules.

46.

A logic error means...

a)

An error that still allows the code to run, however not as expected.

b)

An error that prevents the code from running as it does not follow the code language rules.

47.

The purpose of testing in programming is... (select 2):

a)

To check that the program hits the user requirements

b)

To save variables in the correct places in RAM

c)

To add comments into the code

d)

To check the code runs as expected.

48.

Normal test data is used to...

a)

Test a value that is just inside/outside of what should/shouldn't be accepted.

b)

Test a value that is expected in a program and should work.

c)

Test a value that should be rejected by the program.

49.

Boundary test data is used to...

a)

Test a value that is just inside/outside of what should/shouldn't be accepted.

b)

Test a value that is expected in a program and should work.

c)

Test a value that should be rejected by the program.

50.

Erroneous test data is used to...

a)

Test a value that is just inside/outside of what should/shouldn't be accepted.

b)

Test a value that is expected in a program and should work.

c)

Test a value that should be rejected by the program.

51.

What logic gate is this?

a)

AND

b)

NOT

c)

OR

52.

What logic gate is this?

a)

AND

b)

NOT

c)

OR

53.

What logic gate is this?

a)

AND

b)

NOT

c)

OR

54.

DIV means...

a)

Dividing without including the remainder

b)

Dividing, but only writing the remainder

c)

Multiplying the number by itself

55.

MOD means...

a)

Dividing without including the remainder

b)

Dividing, but only writing the remainder

c)

Multiplying the number by itself

56.

^ means...

a)

Dividing without including the remainder

b)

Dividing, but only writing the remainder

c)

Multiplying the number by itself

57.

13 DIV 4 =

(a)  

58.

29 DIV 5 =

(a)  

59.

29 DIV 5 =

(a)  

60.

63 DIV 10 =

(a)  

61.

4^2 =

(a)  

62.

High-level language means...

a)

A programming language that uses short and basic single words

b)

A programming language that uses English-like words

c)

1s and 0s - used by the CPU

63.

Machine code means...

a)

A programming language that uses short and basic single words

b)

A programming language that uses English-like words

c)

1s and 0s - used by the CPU

64.

" score = input("Enter a number") "

is an example of...

a)

High-level language

b)

Low-level language

c)

Machine code

65.

INP 10

STA 12

OUT 28

is an example of...

a)

High-level language

b)

Low-level language

c)

Machine code

66.

1001 0101

0011 1111

0101 1110

is an example of...

a)

High-level language

b)

Low-level language

c)

Machine code

67.

What computer science concept stores information to be used later?

a)

Conditional

b)

Variable

c)

Loop

d)

Function

68.

What computer science concept does something different depending on the situation?

a)

Conditional

b)

Variable

c)

Loop

d)

Function

69.

What data type would store the value: Oranges

a)

String

b)

Float

c)

Boolean

d)

Integer

70.

What symbol is used to multiply two numbers together?

a)

+

b)

=

c)

*

d)

/

71.

Substring is used to?

a)

Extract a portion of characters from a string

b)

Print out a portion of a string

c)

Remove the left characters by a certain amount

d)

Allow you to change the upper case

72.

What is the purpose of an array?

a)

To store a value

b)

To store multiple values of any type

c)

To store programming code

d)

To store multiple values of the same data type

73.

Which of the following is the correct code to create an array to store some integers?

a)

age = (2, 3, 1)

b)

age = ["2", "3", "1"]

c)

age = ["2" "3" "1"]

d)

age = [2, 3, 1]

74.

Describe what a function is?

a)

A block a code that does not return a value

b)

A block a code that returns a value

c)

A block of code to store multiple values in

d)

A type of iteration

75.

Which of the following is not a boolean operator?

a)

AND

b)

OR

c)

NOT

d)

IS

76.

The IF STATEMENT belongs to which programming construct?

a)

Selection

b)

Sequencing

c)

Iteration

d)

Data Structure

77.

The REPEAT UNTIL OR DO WHILE STATEMENT belongs to which programming construct?

a)

Selection

b)

Sequencing

c)

Iteration

d)

Data Structure

78.

Which of the following is classed as a counter controlled loop?

a)

for loop

b)

while loop

c)

do until loop

d)

If statement

79.

Which of the following is classed as a condition based loop?

a)

for loop

b)

while loop

c)

else statement

d)

if statement

80.

Which of the following is an algorithm for searching?

a)

Linear

b)

Bubble

c)

Merge

d)

Insertion

81.

Which of the following is an algorithm for sorting?

a)

Linear

b)

Binary

c)

Bubble

d)

Selection

82.

Which of the following can be used to help with maintainability?

a)

Naming conventions for variables

b)

Input validation

c)

Authentication

d)

Iterative Testing

83.

Which is the meaning of input validation?

a)

Checking whether the user can log in or not

b)

Checking if an input value fits in with the rules

c)

Checking if the input is maintainable

d)

Checking if the input is correct for test data

84.

Which of the SQL statements will correctly output one row of information?

a)

SELECT * FROM teachers WHERE year group > 7

b)

SELECT * FROM teachers WHERE subject = "Art" and subject = "Business"

c)

SELECT * FROM teachers WHERE subject = "Art"

d)

SELECT * FROM teachers WHERE name = "Mr Liu" or name = "Mr Prior"

85.

Which of the SQL statements will correctly output year groups between 12 and 13?

a)

SELECT * FROM teachers WHERE year group > 11 and year group < 14

b)

SELECT * FROM teachers WHERE year group > 7

c)

SELECT * FROM teachers WHERE year group > 12 and year group < 13

d)

SELECT * FROM teachers WHERE year group > "11" and year group < "14"

86.

IDE stands for?

a)

Information Development Environment

b)

Integrated Development Environment

c)

Integrated Design Environment

d)

Information Design Environment

87.

The following is a truth table for which gate?

a)

AND

b)

OR

c)

NOT

d)

NAND

88.

What type of algorithm is the following?

a)

Bubble

b)

Merge

c)

Insertion

d)

Binary

89.

What is an array?

a)

A set of programming statements grouped together under a single name that can be called to perform a task in a program

b)

A positive or negative whole number that can be used with mathematical operators

c)

A data structure containing several elements of the same data type

d)

A variable or constant that is several characters in length

90.

What is the main purpose of a function in programming?

a)

To group programming statements together under a single name that can be called to perform a task in a program

b)

To declare, use, identify appropriate data types for, read and write arrays with one and two dimensions

c)

To perform calculations using arithmetic operators

d)

To store data in a file and retrieve data from a file

91.

What is the purpose of the ROUND library routine in programming?

a)

To generate a random number

b)

To return the quotient (whole number part) of a division

c)

To return the remainder of a division

d)

To round a value to a given number of decimal places

92.

What is the purpose of the RANDOM library routine in programming?

a)

To return the remainder of a division

b)

To generate a random number

c)

To return the quotient (whole number part) of a division

d)

To round a value to a given number of decimal places

93.

What is the purpose of a loop in programming?

a)

To store data in a file and retrieve data from a file

b)

To repeat a set of instructions multiple times

c)

To declare, use, identify appropriate data types for, read and write arrays with one and two dimensions

d)

To group programming statements together under a single name that can be called to perform a task in a program

94.

What is an algorithm?

a)

A sequence of instructions to solve a problem

b)

It is pseudocode

c)

It is a flowchart

d)

It is a robot

95.

What does this symbol represent?

a)

Process

b)

Input/Output

c)

Start/End

d)

Decision

96.

What does this symbol represent?

a)

Decision

b)

Process

c)

Input

d)

End

97.
The following lists represent 3 passes of a sorting algorithm. Which algorithm is being used to sort the list?
 
4    5    9    6    2    7

4    5    6    2    7    9 
4    5    2    6    7    9
a)
Bubble Sort
b)
Selection Sort
c)
Insertion Sort
98.
What word is missing from the line below?
SELECT *
_______ CUSTOMER;
a)
FROM
b)
WHERE
c)
SELECT
d)
ORDER BY
99.
What is the purpose of  *?
a)
Selects ALL fields from the table
b)
Selects only the first field in the table
c)
Selects the last field in the table
d)
Shows only the first row in the table
100.
You must always use _____ when filtering string values.
a)
quotes
b)
astericks
c)
exclamation point
d)
percent signs
101.
A statement inside another statement
a)
If Statement
b)
Conditional 
c)
Nested Statements
d)
Decrement
102.
Another way of saying "otherwise"
a)
Programming
b)
Parameters
c)
Else
d)
Increment
103.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
104.

If "num1=6" and "num2=9"


What is the output?

a)

Num1 is largest

b)

Num2 is largest

c)

6 is largest

d)

9 is largest

105.

........................... is a simple method of showing an algorithm, using English-like words and mathematical operators that are set out to look like a program.

a)

Structure diagrams

b)

Pseudocode

c)

Flowcharts

d)

Top-Down Design

106.

.............................. shows diagrammatically the steps required for a task (sub-system) and the order that they are to be performed. These steps together with the order are

called an ALGORITHM.

a)

Structure diagrams

b)

Pseudocode

c)

Flowcharts

d)

Top-Down Design

107.

.................. ................... shows the design of a computer system in a hierarchical way, with each level giving a more detailed breakdown of the system into sub-systems.

a)

Structure diagrams

b)

Pseudocode

c)

Flowcharts

d)

Top-Down Design

108.

.................. ................... is the breaking down of a computer system into a set of sub-systems, then breaking each sub-system down into a set of smaller sub-systems, until each sub-system just performs a single action.

a)

Structure diagrams

b)

Pseudocode

c)

Flowcharts

d)

Top-Down Design

109.

A COMPUTER SYSTEM is made up of software, data, hardware, communications and .............;

a)

People

b)

Administrator

c)

Operating System

d)

Manager

110.

Which one of the following is not a TEST DATA?

a)

Big Data

b)

Erroneous or Abnormal Data

c)

Extreme Data

d)

Boundary Data

111.

Testing also needs to be done to prove that the solution does not give incorrect results. In order to do this, test data should be used that will be rejected as the values are not suitable.

a)

Normal Data

b)

Erroneous or Abnormal Data

c)

Extreme Data

d)

Boundary Data

112.

This is used to establish where the largest and smallest values occur. It has 2 inputs

a)

Normal Data

b)

Erroneous or Abnormal Data

c)

Extreme Data

d)

Boundary Data

113.

The name of the a field that identifies each record in a relational database.

a)

Foreign Key

b)

Primary Key

c)

Keyless

d)

None of the above

114.

A collection of field in a database is:

a)

Row

b)

Record

c)

Data

d)

None of the above

115.

A database with only one table is:

a)

Database Management System

b)

Flat file database

c)

Spreadsheet

d)

None of the above

116.

It is a method of retrieving data from several tables and come up with a new table of the extracted fields.

a)

Query

b)

Table

c)

Report

d)

Forms

117.

In a query, we use _____________ to get or filter the data from the database.

a)

Criteria

b)

Crickets

c)

Datatypes

d)

None of the above

118.

A database is an

a)

interesting collection of facts

b)

a computer-based data storage technology

c)

organised collection of data

d)

a large disorganised bucket of data

119.

Datatype to use for a phone number field.

a)

Numeric

b)

Boolean

c)

Currency

d)

Alphanumeric (short text)

120.

Which of the following is a keyword that has pre-defined meaning?

a)

  (a) python  

b)

  (b) data type

c)

  (c) global

d)

  (d) variable