Font size
WorksheetsY9 Half Termer
Total questions: 107
Worksheet time: 1hrs 14mins
What is B in denary
10
11
12
13
What is E in denary
10
12
14
16
12 in denary is what in Hex?
A
B
C
D
What is A in binary
1111
0101
1010
0110
What is 0111 in hex
E
A
7
3
Who uses Hexadecimal?
Computers
Humans
Robots
Why is hexadecimal used by humans
It is easier to read
it takes up less space on the page/screen
it is easier to remember
It is easier to type
It saves space on the computer
Which would be the best way to create a variable to store a real number
Dim r as real
Dim r as decimal
dim number as real
dim number as decimal
which of the following is correct to find if a number n is between 1 and 5 inclusive
IF n <=1 and >=5
IF n > 1 or n < 5
IF n >=1 or n <= 5
IF n >=1 and n <=5
An algorithm is...
A sequence of step by step instructions to complete a task
Breaking a problem down into smaller problems
Removing the unnecessary detail from a problem
A program written to solve a problem
Decomposition is ...
A sequence of step by step instructions to complete a task
Breaking a problem down into smaller problems
Removing the unnecessary detail from a problem
A program written to solve a problem
Abstraction is...
A sequence of step by step instructions to complete a task
Breaking a problem down into smaller problems
Removing the unnecessary detail from a problem
A program written to solve a problem
Which algorithm would be best to search for a value in a list of 1,000,000 ordered numbers
Bubble search
Binary sort
Binary search
Linear search
Which algorithm would be best to search for a number in a list of 1,000,000 random numbers
Linear sort
Linear search
Merge search
Binary search
Which algorithm would sort 1,000,000 random numbers in the least time
Merge search
Bubble sort
Merge sort
Bogosort
Why would a programmer use bubble sort instead of merge sort
It takes less time to sort numbers
It is easier to program
The efficiency gains from merge sort are negligible for small sets of values
it is a good way to show off their programming skills
Which is not a valid VB data type
Integer
Bool
Char
String
What is the correct ending of a FOR loop in VB
}
ENDFOR
NEXT
)
Which is the correct way to start a for loop to loop 10 times in VB
FOR (i=1;i<=10;i++)
FOR i = 0 to 10
FOR i = 1 to 10 step 2
For i = 1 to 10
How do you declare a constant in VB
Const pi As Integer = 3.14
Constant pi as Integer = 3.14
Dim pi as constant = 3.14
Dim pi as Constant Integer = 3.14
What is used in VB to find the remainder of dividing a by b
a \ b
a % b
a div b
a mod b
How would you integer divide a by b
a \ b
a / b
a div b
a mod b
Which one of the following is a 2D array in VB
Dim a(1,2) as string
dim a[1,2] as string
dim a(2) as string
dim a[2] as string
Which is the correct way in VB to create a record called Town
Record Town
Structure Town
Record Structure Town
Town Structure
in VB how would you take a user input and store it in a variable userInput
userInput = Console.Readline()
userInput = Console.ReadKey()
userInput = Console.Read()
userInput = Input
In VB how would you find the length of a string with the identifier myString
myString(length)
myString.Len
Length.myString
myString.Length
in VB how would you join together an integer with the identifier n and a string with the identifier myString
n + myString
n & myString
n AND myString
n.MyString
in VB how would you convert myString to lower case
Lower(myString)
myString.Lower()
myString.ToLower()
Convert.ToLower(myString)
What is not needed in a Function in VB
Function
End Function
Sub
Return
How many parameters are there
Function getMyResult(input, n, score)
1
2
3
4
What type of test data would test a value that should be allowed as an input into a program
Correct
Right
Valid
normal
What type of test data would test a value that should be rejected as an input into a program
Wrong
Erroneous
invalid
incorrect
What type of test data would the edges of valid data
Edge
Boundary
Extreme
outside
Which type of error would stop the program from running?
syntax error
logic error
If a < 1 AND a > 10 Then
this code is not correct, what type of error is it
Syntax error
Logic error
Which error is harder to find
Syntax error
Logic error
A function must ...
contain parameters
return a value
declare its own variables
have an output
A subroutine that does not have to return a value is ....
a procedure
a function
In VB a procedure is written as ...
procedure myProcedure()
subroutine myProcedure()
sub myProcedure()
function myProcedure()
distanceToSchool = 10
Which part is the identifier?
distanceToSchool = 10
What is the value of the variable?
DISPLAY (17 MOD 5)
0
1
2
4
5
DISPLAY (17 MOD 6)
0
1
2
4
5
DISPLAY (6 MOD 5)
0
1
2
4
5
DISPLAY (14 MOD 5)
0
1
2
4
5
"A loop that will iterate at least once" describes which pseudocode programming statement?
FOR...TO...NEXT
IF...THEN...ELSE...END IF
WHILE...DO...ENDWHILE
REPEAT...UNTIL
CASE...OF...OTHERWISE...ENDCASE
"A loop that will iterate a set number of times" describes which pseudocode programming statement?
FOR...TO...NEXT
IF...THEN...ELSE...END IF
WHILE...DO...ENDWHILE
REPEAT...UNTIL
CASE...OF...OTHERWISE...ENDCASE
Select the best description to explain what a binary search algorithm is.
Put the elements in order, check each item in turn.
Put the elements in order, compare with the middle value, split the list in order and repeat.
Elements do not need to be in order, check each item in turn.
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
12 6 8 1 3
How many comparisons would it take to find number 1?
3 5 9 10 23
How many comparisons would it take to find number 9?
1 5 10 13 48 68 100 101
How many comparisons would it take to find number 101?
ASCII stands for...
American Standard Code for Information Interchange
Authentic Style Code for Information Interchange
American System Control for Information Interchange
Authentic System Coding for Information Interchange
What would be the size of an image file that is 10x10 pixels in size and has a 2 bit colour depth?
100 bits
200 bits
2MB
20 bits
