WorksheetsAugust Quiz Python
Total questions: 20
Worksheet time: 7mins
Name
Class
Date
1.
In python the ' STRING data type' can be defined as...?
a)
holds alphanumeric text
b)
hold whole numbers
c)
holds numbers with a decimal point
d)
holds either a true or false value
2.
In python the ' INTEGER data type' can be defined as...?
a)
holds alphanumeric data as text
b)
holds whole numbers
c)
holds numbers with a decimal point
d)
holds either ‘true’ or ‘false’
3.
In python the ' FLOAT data type' can be defined as...?
a)
holds alphanumerical data
b)
holds whole numbers
c)
holds a decimal point in a number
d)
hold either true or false
4.
In python the ' BOOLEAN data type' can be defined as...?
a)
holds alphanumerical data
b)
holds whole numbers
c)
holds a number with a decimal point
d)
holds either true or false
5.
Stores a piece of data, and gives it a specific name
a)
variable
b)
whitespace
c)
interpreter
d)
modulus
6.
Returns the remainder from division
a)
modulus
b)
exponents
c)
boolean
d)
variables
7.
Surrounds multi-line comments
a)
"""
b)
**
c)
#
d)
%
8.
A line of text that Python won't try to run as code
a)
comment
b)
modulus
c)
variable
d)
boolean
9.
Symbol used for modulus
a)
%
b)
&
c)
#
d)
**
10.
The correct way to write a variable in Python?
a)
myVariable = 10
b)
my Variable = 10
c)
myVariable is 10
d)
myVariable: 10
11.
102 = 100
Which of the following is used in Python to calculate ten squared?
Which of the following is used in Python to calculate ten squared?
a)
10 ** 2
b)
10 * 2
c)
10 % 2
d)
10 ** 10
12.
To solve a problem that requires the user to enter 10 numbers would use what type of iteration?
a)
While loop
b)
For loop
c)
Variable
d)
Selection
13.
What will the output be from the following code?
print(Hello world!)
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
14.
What will the output be from the following code?
print(3+4)
print(3+4)
a)
3+4
b)
7
c)
SyntaxError
d)
print(3+4)
15.
What will the output be from the following code?
print("3+4")
print("3+4")
a)
7
b)
3+4
c)
34
d)
SyntaxError
16.
Look at this series: 2, 1, (1/2), (1/4), … What number should come next?
a)
1/3
b)
1/8
c)
2/8
d)
1/16
17.
Which word does NOT belong with the others?
a)
Trivial
b)
Unimportant
c)
Important
d)
Insignificant
18.
CUP : LIP :: BIRD : ?
a)
GRASS
b)
FOREST
c)
BEAK
d)
BUSH
19.
Safe : Secure :: Protect :
a)
Lock
b)
Guard
c)
Sure
d)
Conserve
20.
If ‘-’ means ‘+’, ‘+’ means ‘-’, ‘*’ means ‘÷’ and ‘÷’ means ‘*’ then which of the following will be the correct equation?
a)
10 + 5 - 14 ÷ 10 * 15 = 158
b)
30 + 5 + 14 - 10 * 15 = 122
c)
30 - 5 + 14 ÷ 10 * 15 = 162
d)
30 * 5 - 4 ÷ 10 + 15 = 31
100 %
