NEW
Font size
S
M
L
XL
WorksheetsExploring Python Data Types
Total questions: 6
Worksheet time: 3mins
Name
Class
Date
1.
What is the primary data type used to represent whole numbers in Python?
a)
bool
b)
string
c)
int
d)
float
2.
What is the data type for 5.0 in Python?
a)
string
b)
float
c)
int
d)
bool
3.
What is the value of the result from the following Python code?
x = 2
y = 3
result = x ** y
a)
8
b)
6
c)
9
d)
5
4.
What is the value of the result from the following Python code?
10 / 3 = result
a)
3
b)
3.333333333333333
c)
4
d)
Error
5.
The mathematical formula for converting Fahrenheit to Celcius is:
C=5÷9×(F−32)
How do you write this formula using Python?
a)
C = 5/9 x (F-32)
b)
C = 5 : 9 x (F-32)
c)
C = 5/9 * (F-32)
d)
C = 5 : 9 * (F-32)
6.
What is the value of the result from the following Python code?
x = 0
y = 0
result = x / y
a)
0
b)
1
c)
∞
d)
Error
Reset
