wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Mr Swan's Mega Component 2 Final Revision Quiz

Total questions: 132

Worksheet time: 1hrs 12mins

Name
Class
Date
1.

Identify the search algorithm

a)

Spotlight search

b)

Binary search

c)

Denary search

d)

Next Item search

2.

Identify the description of a linear search

a)

Put the elements in order, start at the first item, check each item in turn

b)

Put the elements in order, compare to the middle value, split the list in order and repeat

c)

Elements do not need to be in order, check each item in turn

d)

Elements do not need to be in order, compare to the middle value, split the list in order

and repeat

3.

Identify the description of a binary search

a)

Put the elements in order, start at the first item, check each item in turn

b)

Start with elements in order, compare to the middle value, split the list in half and repeat

c)

Elements do not need to be in order, check each item in turn

d)

Elements do not need to be in order, compare to the middle value, split the list in order

and repeat

4.

Which term is part of computational thinking?

a)

Using a computer

b)

Developing an algorithm to solve a problem

c)

Making a computer use artificial intelligence

d)

Google is computational thinking

5.

Which of the following is not a component of computational thinking?

a)

Abstraction

b)

Typing

c)

Decomposition

d)

Algorithmic thinking

6.

Define the term abstraction within computational thinking

a)

Adding together numbers

b)

Adding additional levels of detail to a problem to define it

c)

Performing multiple calculations on a list of variables

d)

Removing unnecessary details from a problem

7.

Define the term decomposition within computational thinking

a)

The breaking down of a program until it no longer exists

b)

The creation of music that can be played on a computer

c)

The breaking down of a problem into smaller problems

d)

Adding detail to a solution to make it more complex

8.

Identify which statement describes algorithmic thinking

a)

Thinking like a computer

b)

Writing binary numbers

c)

Identifying the steps involved in solving a problem

d)

Identifying what problems need to be solved

9.

A linear search is to be performed on the list: 12, 6, 8, 1, 3. How many comparisons would it take to find the number 1?

a)

1

b)

2

c)

3

d)

4

10.

A binary search is to be performed on the numbers 3, 5, 9, 10, 23. How many comparisons would it take to find the number 9?

a)

1

b)

2-3

c)

4-5

d)

9 can't be found

11.

A binary search is to be performed on the following numbers: 1, 5, 10, 13, 48, 68, 100, 101. How many comparisons would it take to the find the number 101?

a)

1

b)

2

c)

3-4

d)

4-5

12.

Identify the search performed by the following algorithm

a)

Linear

b)

Binary

c)

Both linear and binary

d)

Neither, it does not work

13.

Which error may produce unexpected results in a program?

a)

Linear

b)

Sum

c)

Logic

d)

Syntax

14.

Which error may stop a program from compiling?

a)

Logic errors

b)

Input errors

c)

Run time errors

d)

Syntax errors

15.

Which of the following is not a sorting algorithm?

a)

Bubble

b)

Insertion

c)

Binary

d)

Merge

16.

Which sorting algorithm is described by: moving through a set of data

repeatedly, compares adjacent elements and swaps any in the wrong order

a)

Merge

b)

Bubble

c)

Insertion

d)

None of these options

17.

Split a list so that each value is in an individual list, then combine these

lists - two at a time - in the correct order, until all lists have been combined

a)

Merge

b)

Bubble

c)

Insertion

d)

None of these options

18.

Which sorting algorithm is described by: take each item in turn,

compare it to the items in the sorted list and place it in the ordered position in the

sorted list?

a)

Merge

b)

Bubble

c)

Insertion

d)

None of these

19.

The following two lists are to be merged using a merge sort. Which

element first goes into the new merged list? The lists are 0 indexed.

LIST 1: 2 4 8 9

LIST 2: 1 6 8 4

a)

List 1 Item 0

b)

List 2 Item 0

c)

List 1 Item 1

d)

List 2 Item 3

20.

The following list is to be sorted using a bubble sort: 12 6 8 1 3

What will the list look like after the first iteration through the list?

a)

6 8 1 3 12

b)

6 12 1 8 3

c)

1 3 6 8 12

d)

6 8 1 12 3

21.

Which sorting algorithm needs to go through the list repeatedly?

a)

Filter

b)

Bubble

c)

Insertion

d)

None of them do

22.

Which sorting algorithm splits a list of items into individual values?

a)

Merge

b)

Bubble

c)

Insertion

d)

None of them do

23.

Which sorting algorithm takes an item from the list, and puts it in the

correct place in a sorted list?

a)

Merge

b)

Bubble

c)

Insertion

d)

None of them do

24.

Identify the correct definition for ‘algorithm'

a)

A problem

b)

A solution to a problem

c)

The steps that are taken to solve a problem

d)

The words to enter when typing

25.

What is the purpose of this shape in a flowchart

a)

Input/Output

b)

Output

c)

Start/Stop

d)

Decision

26.

Identify the purpose of the following flowchart symbol:

a)

Input/Output

b)

Sub program

c)

Process

d)

Decision

27.

Identify the purpose of the following flowchart symbol:

a)

Input/Output

b)

Sub program

c)

Process

d)

Decision

28.

Identify the purpose of the following flowchart symbol:

a)

Process

b)

Input/Output

c)

Sub program

d)

Decision

29.

Identify the purpose of the following flowchart symbol:

a)

Process

b)

Input/Output

c)

Sub program

d)

Decision

30.

How many arrows should come out of a decision symbol in a

flowchart?

a)

0

b)

1

c)

2

d)

3

31.

The following algorithm should take as input and add together two

numbers, outputting the result.

Identify the correct algorithm.

a)

num1 = input("Enter the first number")

num2 – input("Enter the second number")

num3 = num1 + num2

print(num3)

b)

num1 = input("Enter the first number")

num2 = input("Enter the second number")

num3 = num1 + num2

print(num3)

c)

num1 = input("Enter the first number")

num3 = input("Enter the second number")

num3 = num1 + num2

print(num3)

d)

num1 = input("Enter the first number")

num2 = input("Enter the second number")

num3 = num1 + num2

print(num2)

32.

The following algorithm should take a number as input, and output the

12 times table for that number.

Identify the correct algorithm.

a)

number = input("Enter a number")

for x = 1 to 12

print(number * x)

next x

b)

number = input("Enter a number")

for x = 0 to 12

print(number * x)

next x

c)

number = input("Enter a number")

for x = 1 to 12

print(number X x)

next x

d)

number = input("Enter a number")

for x = 1 to 12

print(number * number)

next x

33.

The following algorithm should take as input two numbers, add them

together, multiply the answer by 11, add 4, then divide by 2. It should output the result.

Identify the correct algorithm.

a)

number = input("Enter a number")

number = input("Enter the second number")

final = (((number + number) * 11) + 4) / 2

print (final)

b)

number = input("Enter a number")

number2 = input("Enter the second number")

final = (((number + number2) 11) + 4) 2

print (final)

c)

number = input("Enter a number")

number2 = input("Enter the second number")

final = number + number2 + 4 * 11 / 2

print (final)

d)

number = input("Enter a number")

number2 = input("Enter the second number")

final = (((number + number2) * 11) + 4) / 2

print (final)

34.

The following is not true about variable names

a)

They must be descriptive

b)

They must be in capital letters

c)

They cannot start with numbers or contain spaces

d)

They point to memory locations

35.

Which of the following is a valid keyword for output?

a)

MODIFY

b)

EDIT

c)

DISPLAY

d)

INPUT

36.

Consider the following expression: a = b. This means

a)

a will always be equal to b

b)

b is being renamed into a

c)

The value of memory location a gets copied into memory location b

d)

The value of memory location b gets copied into memory location a

37.

Which of the following is not a valid data type?

a)

Real

b)

String

c)

Character

d)

Fraction

38.

Whole numbers are best stored using this data type:

a)

Boolean

b)

Character

c)

Integer

d)

Real

39.

This variable type can only have the values TRUE or FALSE:

a)

Boolean

b)

Character

c)

Integer

d)

String

40.

Casting refers to:

a)

Boolean algebra

b)

Rounding of reals

c)

Converting data to a different type

d)

Printing out of the program’s results

41.

The operator finds the remainder after integer division:

a)

Integer division

b)

Modulus

c)

Division

d)

Subtraction

42.

The statement A OR B implies A and B are:

a)

Integers

b)

Strings

c)

Booleans

d)

Characters

43.

This function calculates the length of a string:

a)

UBOUND()

b)

INDEX()

c)

LEN()

d)

COUNT()

44.

The result of a logical comparison will be a...

a)

Character

b)

Boolean

c)

Integer

d)

String

45.

Why would you use good code maintainability when writing a program?

a)

Reduces the number of lines of code

b)

Improves how quickly the program runs

c)

Makes code easier to read and debug

d)

All of these options

46.

Variable scope refers to:

a)

Variable data type

b)

Variable identifier

c)

Logic errors associated with a variable

d)

The visibility of variables within a program

47.

The advantages of parameter passing don’t include this:

a)

The same subprogram can be reused in more cases

b)

Makes it easier to use global variables

c)

More flexible coding

d)

Can cut down on the use of wasteful global variables

48.

The main difference between procedures and functions is:

a)

Procedures are usually longer and have more instructions

b)

Functions use parameter passing, while procedures don’t

c)

Functions are more difficult to debug

d)

Functions may return values, while procedures don’t

49.

If a variable appears within a sub program then it is likely to be...

a)

A global variable

b)

A local variable

c)

A parameter variable

d)

A constant

50.

From this statement: a = getChoice() we can see that:

a)

getChoice() is a function

b)

getChoice() is a global variable

c)

a is an array

d)

getChoice() is a procedure

51.

Trying to use a local variable from outside its scope will cause:

a)

A global variable to be overwritten by it

b)

A wrong procedure to run

c)

An error when compiling

d)

A logical error

52.

Which of these statements is true?

a)

Global variables waste memory

b)

showResults(choice,cutoff) is a sub program

c)

An array index is its length

d)

Nested iteration structures can share the same counter variable

53.

else if keyword is used when:

a)

Selection needs to work with more than three choices

b)

Selection needs to work with more than two choices

c)

Using 'case select' statements

d)

Using conditional loops

54.

Identify a correct statement:

a)

SELECT CASE is more popular then IF/ELSE IF/ELSE

b)

We can’t have more than 5 levels of nested IF/ELSE IF/ELSE

c)

SELECT CASE is the same concept as SWITCH

d)

FOR loops are known as condition-controlled iteration

55.

Identify an invalid expression:

a)

else x = = 45 then

b)

if x>9 and x<100 then

c)

x = 10

d)

procedure Test(a as integer)

56.

When a for loop increases a counter by a number other than one, this is called:

a)

Increment

b)

Decrement

c)

Stepping

d)

Condition

57.

For exiting for loops early we use:

a)

Nested iteration

b)

BREAK clause

c)

HALT clause

d)

Conditional loops

58.

The following is not true about arrays:

a)

All array elements have the same data type

b)

Arrays have fixed size that can’t be easily changed during a program run

c)

Arrays use an index

d)

The use of iteration makes arrays less relevant

59.

The following is not a correct statement involving arrays:

a)

array Test[40]

b)

array Test[4] = [56, 34, 89, 8]

c)

array = Test[40]

d)

array [ , ] = SPLIT(MID(“War and Peace”,2,5),”,”)

60.

The following is true about record structures:

a)

They must have an index

b)

Fields are made up of records

c)

Records contain variables that can have different data types

d)

Record arrays are 2D arrays

61.

SQL is used to work with files in this format:

a)

Plain text

b)

CSV

c)

Proprietary binary

d)

Spreadsheets

62.

The following is true about SQL:

a)

It has loops just like any other language

b)

SQL is case sensitive

c)

SQL is hard to read due to a lot of abbreviated keywords

d)

SQL usually runs on top of another language

63.

The purpose of SELECT * FROM Pupils WHERE Result >90 is:

a)

To set every Pupil’s result to 90

b)

To retrieve all the fields from the ‘Pupils’ table but only those where the result is 90

c)

To retrieve all the fields from the ‘Pupils’ table but only those where the result is greater than 90

d)

To retrieve all the fields from the ‘Pupils’ table but only those where the name is greater than 90

64.

In SQL, the LIKE operator is used to:

a)

Approve SQL statements before execution

b)

Replace the WHERE statement

c)

Deal with Boolean fields

d)

Use partial matching when searching

65.

Nested SELECT queries are used:

a)

When Boolean operators get too complex

b)

When retrieving data from multiple tables

c)

When using partial matching

d)

For validation and quality control

66.

.endOfFile() could be used in:

a)

To indicate the end of a line with a formatting delimiter

b)

Conditional loops when writing to a file

c)

Conditional loops when reading from a file

d)

Destructive overwriting of the file’s data

67.

The following is not a valid file open mode:

a)

Delete

b)

Append

c)

Read

d)

Write

68.

The following is a correct way to write to a file:

a)

myFile.readLine(variable)

b)

myFile.writeLine(variable)

c)

myFile.AppendAll(variable)

d)

myFile.InsertAll(variable)

69.

The most appropriate file mode for creating a daily log of entries:

a)

Read

b)

Write

c)

Append

d)

Close

70.

The following is a valid way to write the contents of a 2D array to a text file:

a)

Concatenate each row to a string with commas and then concatenate all rows with new line characters

b)

Split the text file into an array, copy all elements to this array

c)

Use SQL to convert 2D array to records first

71.

Which of these is not a method for ensuring a program is robust?

a)

Keeping passwords safe

b)

Data Validation

c)

Authentication

72.

What is data validation?

a)

Checking that the data entered is wrong

b)

Checking that the data entered is correct

c)

Checking that the data entered is sensible or reasonable

73.

Which of these authentication methods is a common method of authenticating

access to online accounts?

a)

Voice Activation

b)

Biometrics

c)

Key Card

d)

2 factor authentication

74.

Which is these IS NOT an example of validation?

a)

Checking the number entered is 2 digits

b)

Double Entry

c)

Use of a Lookup table

d)

Use of a presence check

75.

What does a range check do?

a)

Checks data is of the right type

b)

Checks the data is between set values

c)

Sorts numbers into ascending order

d)

Checks that the data is in the correct format

76.

A program asks the user to enter their first name. Which is a likely example of Valid

data?

a)

00000

b)

Sarah

c)

S4r4h

d)

Sarah Jones

77.

Which one of these would not help prevent unauthorised access?

a)

Limiting the number of login attempts

b)

Requesting a password and user name

c)

Two factor authentication

d)

Not validating the data entry

78.

What is an example of maintainability?

a)

Checking programs work

b)

Making your code easy to follow, for example, with comments

c)

Testing a program for errors

d)

Training staff to use the program correctly

79.

Which of these is not a method for authenticating a user?

a)

Biometrics

b)

Password and Username

c)

Finger print scanner

d)

Encryption

80.

Why are comments used in a program?

a)

It is required to make the program run

b)

Comments pad out the program and make it look more professional

c)

To help someone follow what is happening in your code

d)

To help security in the code

81.

When should comments be used within a program?

a)

To help describe what code and structures are designed to do

b)

To remind the developer of other tasks to complete in the code

c)

To show tests must be carried out on the code

d)

Every line, so that you know exactly what is happening

82.

What is defensive programming design?

a)

Making your code/program error free

b)

Creating code that is easy to use and understand

c)

A method of ensuring that your code is not misused

d)

Adding comments to a program

83.

Which of the following is a bad example of a variable name?

a)

Customer_Number

b)

variableA

c)

customerNumber

d)

Cust_No

84.

A program has 100 lines of code. What could the programmer use to aid code

maintenance?

a)

Add more variable names to the code

b)

Use authentication

c)

Ensure they use suitable program comments

d)

Delete the spaces between lines of code

85.

How do sub programs improve maintainability?

a)

By returning a value

b)

Gives the program structure

c)

Carrying out a set of instructions

d)

Calling procedure name

86.

A program requires the user to enter their year of birth. What two techniques

could the programmer consider using? (Pick 2 answers)

a)

Data validation

b)

Maintainability

c)

Input verification

d)

Authentication

87.

When is terminal testing carried out?

a)

Before you start

b)

After all code has been written

c)

During the project

d)

After the design section

88.

Which of these is NOT a feature of a test plan?

a)

The data entered

b)

The type of test data

c)

The lines of code you are testing

d)

The expected outcome

e)

The result of the test

89.

When is a runtime error identified?

a)

After the program is executed

b)

Before a program runs

c)

While the program runs

90.

Which of these statements contains a syntax error?

a)

print("hello")

b)

print("Hello")

c)

print("hello)

d)

print("HELLO")

91.

What is iterative testing?

a)

Testing completed after an error is found

b)

Random tests on a computer program

c)

Tests used to inform development

d)

Tests only completed once all code is written

92.

When a program runs it asks the user to enter their age. Which of these would be

used to test for invalid data entry?

a)

44

b)

18

c)

456

d)

Forty Five

93.

Which of these is not used in a test plan?

a)

Valid Data

b)

Boundary Data

c)

Erroneous Data

d)

Average Data

94.

Which of these are not a real type of data used in testing? (Pick 2 options)

a)

Valid Data

b)

Personal Data

c)

Erroneous Data

d)

Real Data

e)

Boundary Value

95.

What is the generic name given to an error found in code?

a)

Bugs

b)

Validation

c)

Syntax

d)

Compilers

96.

Testing while programming is called?

a)

Stop-Start testing

b)

Coder testing

c)

Terminal testing

d)

Iterative testing

97.

What is a breakpoint?

a)

The point at which a program breaks

b)

A feature within an IDE to stop a program at a certain line

c)

The point in a program where an error is found

d)

The point at which the coder is frustrated with the program

98.

Which of these is appropriate data for a range test for a youth club for people

aged 14-18?

a)

10 – 20 years

b)

16 – 19 years

c)

13 – 19 years

d)

13 – 23 years

99.

Which of these is should be accepted for an integer variable?

a)

18.6

b)

99

c)

Twenty-Five

d)

17 years 5 months

100.

What is the purpose of testing?

a)

To identify errors

b)

To identify issues that may occur when a customer uses the program

c)

To test the security of the program

d)

All of these options

101.

What is the output of an OR gate if the inputs are 1 and 0?

a)

0

b)

1

c)

OFF

d)

2

102.

What is the output of an AND gate if the inputs are 1 and 0?

a)

ON

b)

2

c)

1

d)

0

103.

What is the output of a NOT gate if the input is 0?

a)

1

b)

0

c)

OFF

d)

2

104.

A NOT gate has:

a)

Two inputs and one output

b)

One input and one output

c)

One input and two outputs

d)

Two inputs and two outputs

105.

A OR gate has:

a)

Two inputs and one output

b)

One input and one output

c)

One input and two outputs

d)

Two inputs and two outputs

106.

The output of a logic gate can be in one of two:

a)

Gates

b)

States

c)

Inputs

d)

Outputs

107.

A logic state can only be:

a)

On or 1

b)

Off or 0

c)

1 or 0

d)

In and Out

108.

The output of a (a)   gate is only 1 when both inputs are 1:

109.

A NAND gate is the combination of which two gates:

a)

OR and AND

b)

AND and NOT

c)

NOT and OR

d)

OR and NAND

110.

Machine code is used in which generation of a programming language?

a)

1st

b)

2nd

c)

3rd

d)

4th

111.

Which language translator is needed for the first generation?

a)

Compiler

b)

Interpreter

c)

No Translator

d)

Language Translator

112.

Which of these is an example of a low-level language?

a)

Delphi

b)

Assembly

c)

Basic

d)

C#

113.

Which language translators are used with the third generation? (Pick 2 options)

a)

Compiler

b)

Interpreter

c)

No Translator

d)

Language Translator

114.

Which generation would create the fastest code to execute?

a)

1st

b)

2nd

c)

3rd

d)

4th

115.

Which generation would be easier to program for a programmer?

a)

1st

b)

2nd

c)

3rd

d)

4th

116.

An advantage of programming in a high-level programming language is:

a)

Uses natural language and so can be easier to read/understand

b)

Useful for device drivers

c)

The final file size is smaller

d)

Programs run more quickly at runtime

117.

What sort of relationship are low-level languages said to have with high-level

languages?

a)

One to One (One high level instruction is equivalent to one low level)

b)

One to Two (For every high level instruction there are two low level instructions)

c)

One to many (For every high level instruction there are many low level instructions)

d)

Many to One (Many high level instructions translate into one low level instruction)

118.

Software program which optimizes code, ready for execution:

a)

Language Translator

b)

Compiler

c)

Interpreter

119.

Converts instructions in a programming language to a single executable file:

a)

Compiler

b)

Interpreter

120.

Which translator stops when it encounters an error?

a)

Compiler

b)

Interpreter

121.

Which translator produces Object Code and an Error Report listing the errors

found?

a)

Compiler

b)

Interpreter

122.

What is meant by source code?

a)

The final executable program

b)

The code written by the programmer

c)

The additional information about errors

d)

Code relating to sources of information on the Internet

123.

Nearly all IDEs will have this to manipulate source code

a)

Text Editor

b)

Debugger

c)

Compiler

124.

Helps identify and fix errors in code

a)

Text Editor

b)

Debugger

c)

Compiler

125.

Translates source code from a high-level language to a lower level language

a)

Text Editor

b)

Debugger

c)

Compiler

126.

What do you use to write source code?

a)

Text Editor

b)

Debugger

c)

Compiler

127.

What would I use to set a breakpoint?

a)

Text Editor

b)

Debugger

c)

Compiler

128.

Which one would I be using if I had syntax highlighting?

a)

Text Editor

b)

Debugger

c)

Compiler

129.

Which feature translates the source code in the code editor?

a)

Text Editor

b)

Debugger

c)

Compiler

130.

Are IDEs open source?

a)

Yes

b)

No

c)

Some are open source, some are not

131.

Tick all, that are features of an IDE?

a)

Debug Tool

b)

Editor

c)

Project Explorer /Navigation Pane

132.

What is a debugger?

a)

The final executable program

b)

The code written by the programmer

c)

Assists in the detection and correction of errors

d)

Translates code