wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Y9 Half Termer

Total questions: 107

Worksheet time: 1hrs 14mins

Name
Class
Date
1.
Convert 128 to binary
a)
10000000
b)
01111110
c)
10000001
d)
11001100
2.
Convert 37 to binary
a)
00100101
b)
00100011
c)
00100111
d)
01000101
3.
Convert 196 to binary
a)
11000110
b)
11100100
c)
11000100
d)
11010100
4.
Convert 11001100 to decimal
a)
224
b)
134
c)
104
d)
204
5.
Convert 00010001 to decimal
a)
17
b)
27
c)
37
d)
47
6.
Convert 00100100 to decimal
a)
26
b)
36
c)
46
d)
56
7.
Convert 01000100 to decimal
a)
58
b)
68
c)
78
d)
88
8.
Convert 65 to binary
a)
01100001
b)
00100001
c)
01000001
d)
00100101
9.

What is B in denary

a)

10

b)

11

c)

12

d)

13

10.

What is E in denary

a)

10

b)

12

c)

14

d)

16

11.

12 in denary is what in Hex?

a)

A

b)

B

c)

C

d)

D

12.

What is A in binary

a)

1111

b)

0101

c)

1010

d)

0110

13.

What is 0111 in hex

a)

E

b)

A

c)

7

d)

3

14.

Who uses Hexadecimal?

a)

Computers

b)

Humans

c)

Robots

15.

Why is hexadecimal used by humans

a)

It is easier to read

b)

it takes up less space on the page/screen

c)

it is easier to remember

d)

It is easier to type

e)

It saves space on the computer

16.
What is 126 in hexadecimal
a)
7E
b)
111110
c)
76
d)
7F
17.
What is 219 in hexadecimal
a)
DB
b)
DC
c)
BB
d)
ED
18.
What is 253 in hexadecimal
a)
FD
b)
11111101
c)
FF
d)
CD
19.
What is 102 in hexadecimal
a)
66
b)
67
c)
62
d)
6A
20.
What is 142 in hexadecimal
a)
8E
b)
8F
c)
8B
d)
C2
21.

Which would be the best way to create a variable to store a real number

a)

Dim r as real

b)

Dim r as decimal

c)

dim number as real

d)

dim number as decimal

22.

which of the following is correct to find if a number n is between 1 and 5 inclusive

a)

IF n <=1 and >=5

b)

IF n > 1 or n < 5

c)

IF n >=1 or n <= 5

d)

IF n >=1 and n <=5

23.

An algorithm is...

a)

A sequence of step by step instructions to complete a task

b)

Breaking a problem down into smaller problems

c)

Removing the unnecessary detail from a problem

d)

A program written to solve a problem

24.

Decomposition is ...

a)

A sequence of step by step instructions to complete a task

b)

Breaking a problem down into smaller problems

c)

Removing the unnecessary detail from a problem

d)

A program written to solve a problem

25.

Abstraction is...

a)

A sequence of step by step instructions to complete a task

b)

Breaking a problem down into smaller problems

c)

Removing the unnecessary detail from a problem

d)

A program written to solve a problem

26.

Which algorithm would be best to search for a value in a list of 1,000,000 ordered numbers

a)

Bubble search

b)

Binary sort

c)

Binary search

d)

Linear search

27.

Which algorithm would be best to search for a number in a list of 1,000,000 random numbers

a)

Linear sort

b)

Linear search

c)

Merge search

d)

Binary search

28.

Which algorithm would sort 1,000,000 random numbers in the least time

a)

Merge search

b)

Bubble sort

c)

Merge sort

d)

Bogosort

29.

Why would a programmer use bubble sort instead of merge sort

a)

It takes less time to sort numbers

b)

It is easier to program

c)

The efficiency gains from merge sort are negligible for small sets of values

d)

it is a good way to show off their programming skills

30.

Which is not a valid VB data type

a)

Integer

b)

Bool

c)

Char

d)

String

31.

What is the correct ending of a FOR loop in VB

a)

}

b)

ENDFOR

c)

NEXT

d)

)

32.

Which is the correct way to start a for loop to loop 10 times in VB

a)

FOR (i=1;i<=10;i++)

b)

FOR i = 0 to 10

c)

FOR i = 1 to 10 step 2

d)

For i = 1 to 10

33.

How do you declare a constant in VB

a)

Const pi As Integer = 3.14

b)

Constant pi as Integer = 3.14

c)

Dim pi as constant = 3.14

d)

Dim pi as Constant Integer = 3.14

34.

What is used in VB to find the remainder of dividing a by b

a)

a \ b

b)

a % b

c)

a div b

d)

a mod b

35.

How would you integer divide a by b

a)

a \ b

b)

a / b

c)

a div b

d)

a mod b

36.

Which one of the following is a 2D array in VB

a)

Dim a(1,2) as string

b)

dim a[1,2] as string

c)

dim a(2) as string

d)

dim a[2] as string

37.

Which is the correct way in VB to create a record called Town

a)

Record Town

b)

Structure Town

c)

Record Structure Town

d)

Town Structure

38.

in VB how would you take a user input and store it in a variable userInput

a)

userInput = Console.Readline()

b)

userInput = Console.ReadKey()

c)

userInput = Console.Read()

d)

userInput = Input

39.

In VB how would you find the length of a string with the identifier myString

a)

myString(length)

b)

myString.Len

c)

Length.myString

d)

myString.Length

40.

in VB how would you join together an integer with the identifier n and a string with the identifier myString

a)

n + myString

b)

n & myString

c)

n AND myString

d)

n.MyString

41.

in VB how would you convert myString to lower case

a)

Lower(myString)

b)

myString.Lower()

c)

myString.ToLower()

d)

Convert.ToLower(myString)

42.

What is not needed in a Function in VB

a)

Function

b)

End Function

c)

Sub

d)

Return

43.

How many parameters are there

Function getMyResult(input, n, score)

a)

1

b)

2

c)

3

d)

4

44.

What type of test data would test a value that should be allowed as an input into a program

a)

Correct

b)

Right

c)

Valid

d)

normal

45.

What type of test data would test a value that should be rejected as an input into a program

a)

Wrong

b)

Erroneous

c)

invalid

d)

incorrect

46.

What type of test data would the edges of valid data

a)

Edge

b)

Boundary

c)

Extreme

d)

outside

47.

Which type of error would stop the program from running?

a)

syntax error

b)

logic error

48.

If a < 1 AND a > 10 Then

this code is not correct, what type of error is it

a)

Syntax error

b)

Logic error

49.

Which error is harder to find

a)

Syntax error

b)

Logic error

50.

A function must ...

a)

contain parameters

b)

return a value

c)

declare its own variables

d)

have an output

51.

A subroutine that does not have to return a value is ....

a)

a procedure

b)

a function

52.

In VB a procedure is written as ...

a)

procedure myProcedure()

b)

subroutine myProcedure()

c)

sub myProcedure()

d)

function myProcedure()

53.
Which of the following is the definition of a variable?
a)
A container which is used to store values such as the number of attempts a person tries to log on to a network.
b)
A language that is similar to a real programming language, but is easier for humans to understand although it doesn’t actually run on a computer. It can easily be converted to a regular programming language.
c)
A value that cannot be altered by the program during normal execution: the value stays the same. 
d)
Messages to explain to others, and often to remind yourself, what the code is intended to do. 
54.
Which of the following is the definition of a comment?
a)
A container which is used to store values such as the number of attempts a person tries to log on to a network.
b)
A language that is similar to a real programming language, but is easier for humans to understand although it doesn’t actually run on a computer. It can easily be converted to a regular programming language.
c)
A value that cannot be altered by the program during normal execution: the value stays the same. 
d)
Messages to explain to others, and often to remind yourself, what the code is intended to do. 
55.
Which of the following is the definition of pseudocode?
a)
A container which is used to store values such as the number of attempts a person tries to log on to a network.
b)
A language that is similar to a real programming language, but is easier for humans to understand although it doesn’t actually run on a computer. It can easily be converted to a regular programming language.
c)
A value that cannot be altered by the program during normal execution: the value stays the same. 
d)
Messages to explain to others, and often to remind yourself, what the code is intended to do. 
56.
Which of the following is the definition of a constant?
a)
A container which is used to store values such as the number of attempts a person tries to log on to a network.
b)
A language that is similar to a real programming language, but is easier for humans to understand although it doesn’t actually run on a computer. It can easily be converted to a regular programming language.
c)
A value that cannot be altered by the program during normal execution: the value stays the same. 
d)
Messages to explain to others, and often to remind yourself, what the code is intended to do. 
57.
An identifier is the ‘name’ given to a variable. For example: 
distanceToSchool = 10
Which part is the identifier?
a)
10
b)
=
c)
distanceToSchool
58.
An identifier is the ‘name’ given to a variable. For example: 
distanceToSchool = 10
What is the value of the variable?
a)
10
b)
=
c)
distanceToSchool
59.
Which of the following is not a considered a golden rule for choosing variable identifiers?
a)
Shorter identifiers are easier to type and spell. A longer identifier could easily be misspelt. 
b)
Longer identifiers may be used if they are more descriptive of the data they represent. 
c)
Variable identifiers are normally written in capitals.
d)
Some identifiers may be reserved words used by the programming language and cannot be used and in many programming languages identifiers cannot begin with a number.
60.
When variable identifiers are compound words snake case and camel case can be used. Which variable identifier below is using camel case?
a)
yourName=input("What is your name? ")
b)
yourname=input("What is your name? ")
c)
YOURNAME=input("What is your name? ")
d)
your_name=input("What is your name? ")
61.
When variable identifiers are compound words snake case and camel case can be used. Which variable identifier below is using snake case?
a)
yourName=input("What is your name? ")
b)
yourname=input("What is your name? ")
c)
YOURNAME=input("What is your name? ")
d)
your_name=input("What is your name? ")
62.
Which of the following assignment statements is assigning a number .
a)
myAge = 21
b)
myAge = "21"
63.
Which of the following assignment statements is assigning text.
a)
myName = "David"
b)
myAge = 21
64.
A constant is a value that cannot be altered by the program during normal execution: the value stays the same. 
a)
True
b)
False
65.
A constant is normally written in lower case.
a)
True
b)
False
66.
Which is the correct way to get the user to enter a value when written as pseudocode?
a)
input (“Please enter the length”)
b)
length == input ("Please enter the length")
c)
length = (“Please enter the length”)
d)
length = input (“Please enter the length”)
67.

DISPLAY (17 MOD 5)

a)

0

b)

1

c)

2

d)

4

e)

5

68.

DISPLAY (17 MOD 6)

a)

0

b)

1

c)

2

d)

4

e)

5

69.

DISPLAY (6 MOD 5)

a)

0

b)

1

c)

2

d)

4

e)

5

70.

DISPLAY (14 MOD 5)

a)

0

b)

1

c)

2

d)

4

e)

5

71.

"A loop that will iterate at least once" describes which pseudocode programming statement?

a)

FOR...TO...NEXT

b)

IF...THEN...ELSE...END IF

c)

WHILE...DO...ENDWHILE

d)

REPEAT...UNTIL

e)

CASE...OF...OTHERWISE...ENDCASE

72.

"A loop that will iterate a set number of times" describes which pseudocode programming statement?

a)

FOR...TO...NEXT

b)

IF...THEN...ELSE...END IF

c)

WHILE...DO...ENDWHILE

d)

REPEAT...UNTIL

e)

CASE...OF...OTHERWISE...ENDCASE

73.
Define what is meant by the term 'algorithm'
a)
Step by step instructions or rules to solve a problem.
b)
Code for a specific task.
74.
Which type of lists or data sets are linear searching algorithms used for?
a)
Unsorted lists or data sets
b)
Sorted lists or data sets
75.
Which type of lists or data sets are binary searching algorithms used for?
a)
Unsorted lists or data sets
b)
Sorted lists or data sets
76.
Select the best description to explain what a linear search algorithm is.
a)
Put the elements in order, check each item in turn.
b)
Put the elements in order, compare with 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
77.

Select the best description to explain what a binary search algorithm is.

a)

Put the elements in order, check each item in turn.

b)

Put the elements in order, compare with 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

78.
A linear search is to be performed on the list:
12   6   8  1  3
How many comparisons would it take to find number 1?
a)
1
b)
2
c)
3
d)
4
79.
A binary search is to be performed on the list:
3  5  9  10  23
How many comparisons would it take to find number 9?
a)
0-1
b)
2-3
c)
4-5
d)
I can't find the number 9
80.
A binary search is to be performed on the list:
1  5  10  13  48  68  100  101
How many comparisons would it take to find number 101?
a)
0-1
b)
1-2
c)
3-4
d)
4-5
81.
Describe an advantage of a linear search algorithm
a)
Data does not need to be in order.
b)
Performs well over large ordered lists.
c)
Can only work on an ordered list.  If unordered must use a linear search.
d)
Slow with large data sets.
82.
Describe a disadvantage of a linear search algorithm
a)
Data does not need to be in order.
b)
Performs well over large ordered lists.
c)
Can only work on an ordered list.  If unordered must use a linear search.
d)
Slow with large data sets.
83.
Describe an advantage of a binary search algorithm
a)
Data does not need to be in order.
b)
Performs well over large ordered lists.
c)
Can only work on an ordered list.  If unordered must use a linear search.
d)
Slow with large data sets.
84.
Describe a disadvantage of a binary search algorithm
a)
Data does not need to be in order.
b)
Performs well over large ordered lists.
c)
Can only work on an ordered list.  If unordered must use a linear search.
d)
Slow with large data sets.
85.
Describe an advantage of a linear search algorithm
a)
If the criteria matches the last item in list, entire list has to be checked.
b)
Simple to code than a binary search.
c)
Quicker than a linear search.
d)
Can only work on an ordered list.  If unordered must use a linear search.
86.
Describe a disadvantage of a linear search algorithm
a)
If the criteria matches the last item in list, entire list has to be checked.
b)
Simple to code than a binary search.
c)
Quicker than a linear search.
d)
Can only work on an ordered list.  If unordered must use a linear search.
87.
Describe an advantage of a binary search algorithm
a)
If the criteria matches the last item in list, entire list has to be checked.
b)
Simple to code than a binary search.
c)
Quicker than a linear search.
d)
Can only work on an ordered list.  If unordered must use a linear search.
88.
Describe a disadvantage of a binary search algorithm
a)
If the criteria matches the last item in list, entire list has to be checked.
b)
Simple to code than a binary search.
c)
Quicker than a linear search.
d)
More complicated to code than a linear search.
89.
ASCII is:
a)
a numerical system that has 2 rather than 10 as a base.
b)
the most common format for text files in computers and on the Internet
90.
True or False: In an ASCII file, each alphabetic, numeric, or special character is represented with a 7-bit binary number (a string of seven 0s or 1s).
a)
True
b)
False
91.
The word "Hello" is made up of 5 characters. How many bits is this (hint: how many 1's and 0's are needed to write it)
a)
40
b)
60
c)
80
d)
48
92.
Convert this to a decimal number
a)
13
b)
12
c)
10
d)
8
93.

ASCII stands for...

a)

American Standard Code for Information Interchange

b)

Authentic Style Code for Information Interchange

c)

American System Control for Information Interchange

d)

Authentic System Coding for Information Interchange

94.
True or False: The binary number for a capital 'A' is the same as the binary number for a lower-case 'a'?
a)
True
b)
False
95.
Quality of an image depends on:
a)
Resolution
b)
Metadata
c)
Screen size
d)
Computer's speed
96.
The density of pixels in an image file is known as:
a)
Resolution
b)
Dimensions.
c)
Transparency.
d)
Compression.
97.
Resolution is measured in:
a)
Pixels per mm or per inch
b)
Print size.
c)
Milimeters.
d)
Bytes.
98.
Identify a true statement:
a)
Image files can be compressed by setting pixels with similar colour to the exactly same colour.
b)
Compressing files improves their quality.
c)
Resolution doesn't affect the printed size of an image.
d)
Black and white images have colour depth of two bits.
99.
Colour depth refers to:
a)
How many bits are used in a file to store colour information in every pixel
b)
Resolution divided by the number of colours in an image.
c)
Degree of file compression applied to an image file.
d)
Repeated resampling of an image.
100.
Most graphic formats create many colours from:
a)
Red, green, blue.
b)
Red, pink, yellow.
c)
Red, white, blue.
d)
Black, white, green.
101.
The smallest unit of data stored in an image file is called:
a)
Pixels
b)
Resolution
c)
Alpha
d)
Bitmap.
102.
Alpha-channel present in some images refers to:
a)
Transparency of pixels.
b)
Quality of a file.
c)
The order in which alternative pixels are loaded.
d)
Degree of file compression applied to an image file.
103.
Which is NOT an effect of increasing the resolution in an image?
a)
More colours can be displayed.
b)
More binary will be required to create the image.
c)
Larger file size
d)
Higher quality image
104.
Which is NOT an effect of increasing the colour depth in an image?
a)
More colours can be displayed.
b)
More binary will be needed per pixel to create the image.
c)
Larger file size
d)
More pixels will be displayed in the image.
105.
What would be the colour depth of an image which can use up to 256 colours?
a)
256 bit
b)
8 bit
c)
8 byte
d)
256 byte
106.
Define the term "Colour Depth"
a)
The number of bits used per pixel (BPP).
b)
The number of colours used in an image.
c)
The number of pixels per inch (PPI).
d)
The total number of pixels in an image.
107.

What would be the size of an image file that is 10x10 pixels in size and has a 2 bit colour depth?

a)

100 bits

b)

200 bits

c)

2MB

d)

20 bits