Completed
Data Types & Operators
Questions From This Challenge
Q1mcq1 mark
What is the data type of the value 25 in Python?
int ✓
float
str
bool
Q2mcq1 mark
What is the data type of the value 3.0 in Python?
int
float ✓
complex
bool
Q3mcq1 mark
In Python, True and False are literals belonging to which built-in data type?
int
str
bool ✓
None
Q4mcq1 mark
The value 3+4j in Python belongs to which built-in numeric data type?
int
float
complex ✓
bool
Q5mcq1 mark
'Hello' (a sequence of characters enclosed in quotes) is an example of which Python data type?
str ✓
list
tuple
dict
Q6mcq1 mark
Which of the following is a key difference between a Python list and a Python tuple?
A list is immutable while a tuple is mutable
A list is enclosed in ( ) while a tuple is enclosed in [ ]
A list is mutable, meaning its elements can be changed after creation, while a tuple is immutable ✓
A list can only store numbers while a tuple can store any data type
Q7mcq1 mark
student = {'name': 'Rhea', 'age': 16} is an example of which Python data type?
list
tuple
dict ✓
str
Q8mcq1 mark
The special value None in Python represents:
The number zero
An empty string
The absence of a value / no value assigned ✓
The boolean value False
Q9mcq1 mark
Which of the following Python data types is mutable, meaning its contents can be changed after it is created?
int
str
tuple
list ✓
Q10mcq1 mark
Which operator checks whether two variables refer to the exact same object in memory, rather than simply checking whether their values are equal?
==
is ✓
in
=
Q11mcq1 mark
What does the expression 'a' in 'apple' evaluate to?
True ✓
False
1
Error
Q12mcq1 mark
What does the expression 5 == 5.0 evaluate to in Python?
True ✓
False
Error
None
Q13output1 mark
What is printed when this code runs?
a = 10 b = 3 print(a // b, a % b, a ** 2)
Correct output:
3 1 100Q14output1 mark
What is printed when this code runs?
x = 5 y = 10 print(x == y, x < y, x != y)
Correct output:
False True TrueQ15output1 mark
What is printed when this code runs?
p = True q = False print(p and q, p or q, not p)
Correct output:
False True False