WorksheetsComputer Science Quiz
Total questions: 59
Worksheet time: 30mins
What is an algorithm?
A set of rules
Step by step instructions to solve a problem
Instructions that are executed one after another
Instructions that are completed in a random order
people = ["John", "Rob", "Bob"]
print (people[1])
what would this result be?
people = ["John", "Rob", "Bob"]
print (people[4])
what would this result be?
A data type than can have one of two values: True or False
boolean
variable
modulo
interpreter
What is the % used for in Python?
To give the remainder
To divide and return an integer
To divide and return a float
To give the percentage
What is a variable?
Step by step instructions to solve a problem
A location in memory that stores a value, and that value can change
A set of rules
A location in memory that stores a value, and that value cannot change
A type of error that occurs when a rule of the programming language code is broken?
Syntax error
Logic error
Run-time error
Program error
Which of these are primitive data types in Python ...
int
float
Bool
char
Which data type would be used in Python to store the value of pi to 2 decimal places?
Integer
Float
Boolean
String
What is this a description of?
A named piece of storage used by a computer program that can change its value
Variable
Constant
Function
Parameter
Choose all the rules that are correct for naming variables
Must not begin with a number
Must only contain a-z and 0-9 characters
Must use _ to join words
Must be in lower case
In what way is a constant different from a variable?
It can not change its value during program execution
It can store more than one value
It can only be used in the global scope
Its name must be written in UPPER CASE
Choose all the standard advice for naming variables in a program ...
Use a meaningful name
Use camelText to join up words
Don't make them too long
Keep them as short as possible
The process of giving a value to a variable?
Assignment
Initialisation
Coercion
Declaration
Example of ... ?
Selection
Repetition
Sequence
Iteration
Symbols used for entering comments in Python ...?
# This is a Python comment
''' This is a Python comment '''
// This is a Python comment
/* This is a Python comment */
Python is a (a) level programming language?
If the following code was run, what would be the output? :
print (8/4)
2
SyntaxError
2.0
"8/4"
Python provides the following selection statements.
if statement
if-else statement
if-elseif statement
True
False
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.
if statement
if-else statement
if-elif statement
Hello world!
Hello world
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
......(repeated continuously)
Error
Which of these is NOT a loop in python?
for loop
while loop
nested loop
if loop
If you want more than one option for your code, what do you use (after if)?
elif
elseif
else
What doesn’t affect the performance of the computer
Clock Speed
Number of Cores
The number of instructions in the program
Cache Size
Processors don’t do the following
Operate in Hz
Execute Data
Execute Instructions
Process Data
The part of a processor in which instructions are executed is known as?
Core
Centre
Instruction Centre
Execution
In which country is KFC eaten on Christmas eve?
USA
Australia
Japan
Russia
In which country are latkes (fried potato pancakes) traditionally eaten at Christmas?
Russia
New Zealand
France
Israel
Panettone is a bread with fruits or chocolates and is from what country?
Italy
Argentina
South Africa
Israel
Tamales (a corn dough wrapped in banana leaf or corn husk) is traditionally served at Christmas in?
Korea
South Africa
Costa Rica
Argentina
Serving a Christmas Pudding traditionally started in what country?
New Zealand
England
Australia
America
A julbord (like a buffet) is how people in ........ serve up their food at Christmas.
Fiji
Hong Kong
France
Sweden
Mattak is strips of whale blubber encased in whale skin and is served as part of the traditional Christmas meal from ?
New Zealand
Greenland
Antarctica
Poland
Bûche de Noël is a Yule style log dessert from?
France
England
Sweden
Poland
Shrimp for Christmas. In which country is this likely to happen?
Zimbabwe
Peru
Iceland
Australia
In what country are apples wrapped in colourful paper and decorated with gold ribbon given as a gift at Christmas?
New Zealand
Ireland
China
Australia
Which country claims this dessert as theirs at Christmas time?
New Zealand
England
America
Japan
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?
New Zealand
Thailand
Germany
Poland
What name is given to small sausages wrapped in bacon, a staple at a British Christmas dinner?
Snuffling piggies
Pork wraps
Snuggly pigs
Pigs in blankets
The red and white costume of Father Christmas was allegedly first introduced by which drinks manufacturer?
Pepsi
Smirnoff
Coca Cola
Nescafe
Approximately how many candy canes are manufactured during the festive season?
3.9 million
12 million
1.7 billion
1.1 billion
What should you stick into an onion for a traditional bread sauce?
A sausage
Cloves
A silver shilling
A two pence piece
Finally, why do so many people hate Brussels sprouts?
Because they're fussy
It's in our genetic make-up in detecting bitter flavours
Brussels sprouts were invented by Satan
Historically, they were force fed to the poor which has created an inherent aversion
