wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Quiz

Total questions: 59

Worksheet time: 30mins

Name
Class
Date
1.

What is an algorithm?

a)

A set of rules

b)

Step by step instructions to solve a problem

c)

Instructions that are executed one after another

d)

Instructions that are completed in a random order

2.
Code repeated / looped until a condition has been met or a set number of times.
a)
Sequence
b)
Selection
c)
Iteration
d)
Variable
3.
Joining elements together to make a string is called what?
a)
Combining
b)
Connecting
c)
Concatenation
d)
Stringing
4.

people = ["John", "Rob", "Bob"]

print (people[1])

what would this result be?

a)
John
b)
Rob
c)
Bob
5.

people = ["John", "Rob", "Bob"]

print (people[4])

what would this result be?

a)
John
b)
Rob
c)
Bob
d)
Error
6.
To repeat a fixed number of times use a
a)
while loop
b)
for loop
c)
if loop
d)
indentation
7.
To repeat until a particular condition is true use
a)
while loop
b)
for loop
c)
if loop
d)
indentation
8.

A data type than can have one of two values: True or False

a)

boolean

b)

variable

c)

modulo

d)

interpreter

9.

What is the % used for in Python?

a)

To give the remainder

b)

To divide and return an integer

c)

To divide and return a float

d)

To give the percentage

10.

What is a variable?

a)

Step by step instructions to solve a problem

b)

A location in memory that stores a value, and that value can change

c)

A set of rules

d)

A location in memory that stores a value, and that value cannot change

11.

A type of error that occurs when a rule of the programming language code is broken?

a)

Syntax error

b)

Logic error

c)

Run-time error

d)

Program error

12.

Which of these are primitive data types in Python ...

a)

int

b)

float

c)

Bool

d)

char

13.

Which data type would be used in Python to store the value of pi to 2 decimal places?

a)

Integer

b)

Float

c)

Boolean

d)

String

14.

What is this a description of?


A named piece of storage used by a computer program that can change its value

a)

Variable

b)

Constant

c)

Function

d)

Parameter

15.

Choose all the rules that are correct for naming variables

a)

Must not begin with a number

b)

Must only contain a-z and 0-9 characters

c)

Must use _ to join words

d)

Must be in lower case

16.

In what way is a constant different from a variable?

a)

It can not change its value during program execution

b)

It can store more than one value

c)

It can only be used in the global scope

d)

Its name must be written in UPPER CASE

17.

Choose all the standard advice for naming variables in a program ...

a)

Use a meaningful name

b)

Use camelText to join up words

c)

Don't make them too long

d)

Keep them as short as possible

18.

The process of giving a value to a variable?

a)

Assignment

b)

Initialisation

c)

Coercion

d)

Declaration

19.

Example of ... ?

a)

Selection

b)

Repetition

c)

Sequence

d)

Iteration

20.

Symbols used for entering comments in Python ...?

a)

# This is a Python comment

b)

''' This is a Python comment '''

c)

// This is a Python comment

d)

/* This is a Python comment */

21.

Python is a (a)   level programming language?

22.

If the following code was run, what would be the output? :

print (8/4)

a)

2

b)

SyntaxError

c)

2.0

d)

"8/4"

23.

Python provides the following selection statements.

if statement

if-else statement

if-elseif statement

a)

True

b)

False

24.

If the condition is True, then the true block of statements is executed and if it is False, then the false block of statements is executed.

a)

if statement

b)

if-else statement

c)

if-elif statement

25.
a)

Hello world!

b)

Hello world

c)

Hello world!

Hello world!

Hello world!

Hello world!

Hello world!

Hello world!

......(repeated continuously)

d)

Error

26.

Which of these is NOT a loop in python?

a)

for loop

b)

while loop

c)

nested loop

d)

if loop

27.

If you want more than one option for your code, what do you use (after if)?

a)

elif

b)

elseif

c)

else

28.

What doesn’t affect the performance of the computer

a)

Clock Speed

b)

Number of Cores

c)

The number of instructions in the program

d)

Cache Size

29.

Processors don’t do the following

a)

Operate in Hz

b)

Execute Data

c)

Execute Instructions

d)

Process Data

30.

The part of a processor in which instructions are executed is known as?

a)

Core

b)

Centre

c)

Instruction Centre

d)

Execution

31.
Where do children in the United Kingdom hang their stockings?
a)
around the fireplace
b)
around the bed
c)
on the wall
32.
Where do children in America hang their stockings?
a)
around the fireplace
b)
around the bed 
c)
on the wall
33.
What is the correct order of days?
a)
Christmas Day, Boxing Day, Christmas Eve
b)
Christmas Eve, Boxing Day, Christmas Day
c)
Christmas Eve, Christmas Day, Boxing Day
34.
What day is the most important at Christmas time in the UK?
a)
Christmas Eve
b)
Christmas Day
c)
Boxing Day
35.
What do people in Britain usually do on Boxing Day?
a)
They open their presents
b)
They eat Christmas dinner
c)
They go shopping
36.
What do people eat for Christmas dinner?
a)
candy cane
b)
crackers
c)
turkey
37.
I Want A Hippopotamus For...
a)
Christmas
b)
Crusmus
38.

In which country is KFC eaten on Christmas eve?

a)

USA

b)

Australia

c)

Japan

d)

Russia

39.

In which country are latkes (fried potato pancakes) traditionally eaten at Christmas?

a)

Russia

b)

New Zealand

c)

France

d)

Israel

40.

Panettone is a bread with fruits or chocolates and is from what country?

a)

Italy

b)

Argentina

c)

South Africa

d)

Israel

41.

Tamales (a corn dough wrapped in banana leaf or corn husk) is traditionally served at Christmas in?

a)

Korea

b)

South Africa

c)

Costa Rica

d)

Argentina

42.

Serving a Christmas Pudding traditionally started in what country?

a)

New Zealand

b)

England

c)

Australia

d)

America

43.

A julbord (like a buffet) is how people in ........ serve up their food at Christmas.

a)

Fiji

b)

Hong Kong

c)

France

d)

Sweden

44.

Mattak is strips of whale blubber encased in whale skin and is served as part of the traditional Christmas meal from ?

a)

New Zealand

b)

Greenland

c)

Antarctica

d)

Poland

45.

Bûche de Noël is a Yule style log dessert from?

a)

France

b)

England

c)

Sweden

d)

Poland

46.

Shrimp for Christmas. In which country is this likely to happen?

a)

Zimbabwe

b)

Peru

c)

Iceland

d)

Australia

47.

In what country are apples wrapped in colourful paper and decorated with gold ribbon given as a gift at Christmas?

a)

New Zealand

b)

Ireland

c)

China

d)

Australia

48.

Which country claims this dessert as theirs at Christmas time?

a)

New Zealand

b)

England

c)

America

d)

Japan

49.

A superstition in this country is that on Christmas Eve, the table must be set with 12 plates (in honour of the 12 Apostles). One plate is a red soup or barszcz, made with beets and often accompanied by pierogi. What country does this?

a)

New Zealand

b)

Thailand

c)

Germany

d)

Poland

50.

What name is given to small sausages wrapped in bacon, a staple at a British Christmas dinner?

a)

Snuffling piggies

b)

Pork wraps

c)

Snuggly pigs

d)

Pigs in blankets

51.

The red and white costume of Father Christmas was allegedly first introduced by which drinks manufacturer?

a)

Pepsi

b)

Smirnoff

c)

Coca Cola

d)

Nescafe

52.

Approximately how many candy canes are manufactured during the festive season?

a)

3.9 million

b)

12 million

c)

1.7 billion

d)

1.1 billion

53.

What should you stick into an onion for a traditional bread sauce?

a)

A sausage

b)

Cloves

c)

A silver shilling

d)

A two pence piece

54.

Finally, why do so many people hate Brussels sprouts?

a)

Because they're fussy

b)

It's in our genetic make-up in detecting bitter flavours

c)

Brussels sprouts were invented by Satan

d)

Historically, they were force fed to the poor which has created an inherent aversion

55.
What is the most hated yet eaten vegetable at Christmas?
a)
Parsnips
b)
Carrots
c)
Brussel Sprouts
d)
Cabbage
56.
What is the most traditional stuffing used to stuff the turkey?
a)
Sage and onion
b)
Apricot
c)
Chestnut
d)
Lemon and herb
57.
Which of the following is not a component inside a processor?
a)
Memory
b)
Control Unit
c)
Arithmetic Logic Unit
d)
General Purpose Registers
e)
Text for option 5 (optional)
58.
The control unit does what?
a)
Connects parts of the CPU together.
b)
Performs arithmetic and logical operations on the data.
c)
Stores the outcomes of arithmetic and logic operations.
d)
Controls timing and control signals around the CPU.
59.
What does ALU stand for?
a)
Addition Logic Unit
b)
Arithmetic Logical Unit
c)
Arithmetic Logic Unit
d)
Algebra Logic Unit