Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Year 9 Michaelmas Revision

Total questions: 30

Worksheet time: 30mins

Name
Class
Date
1.

Convert denary 35 to binary

a)

00110101

b)

100011

c)

100010

d)

11100

2.

Convert binary 11001 to denary

a)

19

b)

25

c)

49

d)

48

3.

Convert hexadecimal 0xA5 to binary

a)

10100101

b)

10110101

c)

01011010

d)

11000011

4.

Convert binary 11001001 to hexadecimal

a)

0xB9

b)

0xA9

c)

0xC9

d)

0xCA

5.

Multiply the binary number 101 by 4

a)

1010000

b)

10100

c)

1010

d)

101100

6.

Divide the binary number 11010 by 2

a)

110100

b)

11010

c)

1101

d)

110

7.

How much green is there in the HTML colour #AFB40A

a)

AF

b)

B4

c)

0A

d)

40

8.

Can you double the hex value 0x55, leaving your answer in hex?

a)

0x110

b)

0x1010

c)

0xAA

d)

0x120

9.

What is it called when there is not enough memory reserved for the result of a calculation?

a)

Crash

b)

Memory Dump

c)

Overflow

d)

Error

10.

What is an expert system an example of?

a)

Selection

b)

Top-test iteration

c)

Bottom-test iteration

d)

Input

11.

What algorithmic term does IF .. THEN .. ELSE .. ENDIF demonstrate

a)

Top-test iteration

b)

Bottom-test iteration

c)

Selection

12.

What algorithmic term does WHILE .. DO .. ENDWHILE demonstrate

a)

Top-test iteration

b)

Bottom-test iteration

c)

Selection

13.

What algorithmic term does REPEAT .. UNTIL demonstrate

a)

Top-test iteration

b)

Bottom-test iteration

c)

Selection

14.

If an algorithm has to repeat an action at least once, what pseudocode should you choose?

a)

IF .. THEN .. ELSE .. ENDIF

b)

WHILE .. DO .. ENDWHILE

c)

REPEAT .. UNTIL

d)

INPUT

15.

If an algorithm has to repeat an action zero or more times, what pseudocode should you choose?

a)

IF .. THEN .. ELSE .. ENDIF

b)

WHILE .. DO .. ENDWHILE

c)

REPEAT .. UNTIL

d)

INPUT

16.

If an algorithm has to choose what action to do next from two options, which is only done once, what pseudocode should you choose?

a)

IF .. THEN .. ELSE .. ENDIF

b)

WHILE .. DO .. ENDWHILE

c)

REPEAT .. UNTIL

d)

INPUT

17.

Which of these is a valid variable name?

a)

Two Choices

b)

2Choices

c)

TwoChoices

d)

Two-Choices

18.

Which code demonstrates assignment in a computer program?

a)

x = 4

b)

x == 4

c)

x + 4

d)

addFour(x)

19.

Which code will allow a user to enter a number into a variable called num?

a)

input(num)

b)

input(num) = int

c)

int = num(input())

d)

num = int(input())

20.

What code will allow a user to enter a word into a variable called password?

a)

input(pasword)

b)

password = input

c)

password = input()

d)

input = password

21.

which code will print 'Hi' if x is not 4 (ignore new lines)?

a)

if x == 4 : print("Hi")

b)

if x != 4 : print("Hi")

c)

if x <> 4 : print("Hi")

d)

if x is not 4 : print("Hi")

22.

which code will print 'Ho' if x is between 3 and 7 (ignore new lines)?

a)

if x > 3 and x < 7: print("Ho")

b)

if x < 3 and x > 7: print("Ho")

c)

if x > 3 or x < 7: print("Ho")

d)

if x < 3 or x > 7: print("Ho")

23.

which code will print 'Foo' if y is not between 5 and 8 (ignore new lines)?

a)

if y <= 5 or y >= 8 : print("Foo")

b)

if y =< 5 or y => 8 : print("Foo")

c)

if y > 5 and y < 8 : print("Foo")

d)

if y >= 5 and y <= 8 : print("Foo")

24.

If x is 9 and y id 10, which line of code would print "x is 9 and y is 10"?

a)

print("x is", x, "and y is", y)

b)

print("x is" x "and y is" y)

c)

print("x is", y, "and y is", x)

d)

print("x is," x, "and y is," y)

25.

What would this code print?

a)

Ha 0

Ha 1

Ha 2

Ho

b)

Ha 1

Ha 2

Ho

c)

Ha 0

Ha 1

Ho

d)

Ha 0

Ho

Ha 1

Ho

Ha 2

Ho

26.

What would this code print?

a)

Zed

b)

Why

c)

Ex

d)

Why

Ex

27.

What algorithmic structure does this code mainly demonstrate?

a)

Top-test iteration

b)

Bottom-test iteration

c)

Selection

d)

Expert system

28.

Which line numbers demonstrate assignment?

a)

5

b)

1 & 5

c)

1 & 4

d)

3 & 7

29.

What would be printed by this code?

a)

Hum

Drum

b)

Hum

Hum

Drum

c)

Hum

Drum

Hum

Drum

d)

Hum

Hum

Hum

Drum

30.

How many syntax errors are there in this code?

a)

4

b)

5

c)

6

d)

7