Home
MCQs by exam
Python Interview Data Types
Python Interview Data Types MCQs
18 multiple choice questions typical of the Python Interview Data Types exam, with answers and explanations. Switch on practice mode to test yourself first.
a = 256; b = 256
x = [1]; y = [1]
print(a is b, x is y)
A
True False
Correct answer
B
True True
C
False False
D
False True
A
int only
B
str
C
NoneType
D
bool
Correct answer
print('5' + '5')
A
55
Correct answer
B
10
C
Error
D
'5'5
A
decimal
Correct answer
B
math
C
numbers
D
fractions only
print(round(3.14159, 2))
A
3.1
B
3.14
Correct answer
C
3.15
D
3
A
3.5
B
4
C
3
Correct answer
D
2
print(bin(5))
A
101
B
0b101
Correct answer
C
5
D
0x5
A
list
B
dict
C
set
D
tuple
Correct answer
print(round(2.5))
A
2.5
B
2
Correct answer
C
3
D
4
print(True + True)
A
1
B
True
C
Error
D
2
Correct answer
A
2**31 - 1
B
2**63 - 1
C
There is no fixed limit; it is bounded by available memory
Correct answer
D
2**32
print(bool('0'))
A
False
B
True
Correct answer
C
Error
D
None
print(hex(255))
A
ff
B
0xff
Correct answer
C
255
D
0b11111111
print([1, 2] == [1, 2])
A
False
B
Error
C
None
D
True
Correct answer
print(0.1 + 0.2 == 0.3)
A
True
B
Error
C
False
Correct answer
D
None
print(int('1010', 2))
A
1010
B
10
Correct answer
C
0b1010
D
Error
A
Whether two values are equal
B
Whether two variables reference the same object
Correct answer
C
Whether a value is of a given type
D
Whether a value is None only
A
2
B
1
Correct answer
C
0
D
2.33
Practise on paper
Preparing for Python Interview Data Types?
Make it your exam plan: see your progress in every subject and topic, set a daily goal and practise what you have not done yet.
Start my Python Interview Data Types plan
Test yourself
Take a timed online test and get a certificate, or play today's quick quiz.
Online tests
Daily quiz