Python Quiz for Identity Operator
There are 20 questions based on Python Identity Operator.
Sign in to Google to save your progress. Learn more
Q1.  What is the purpose of the is operator in Python?   *
4 points
Q2.  Which of the following is true about the is not operator?   *
4 points
Q3.  What will the following code output?
x = [1, 2, 3]
y = [1, 2, 3] 
print(x is y)
*
4 points
Q4.  Given the code below, what does z is None evaluate to?
z = None
*
4 points
Q5.  What is the output of the following?
a = 10 
b = 10 
print(a is b)
*
4 points
Q6.  What does is check in Python?   *
4 points
Q7.  What will the following code output?
x = [1, 2, 3
y = x 
print(x is y)
*
4 points
Q8.  If a = None and b = None, what does a is b return?   *
4 points
Q9.  Which operator is used to check if two variables refer to the same object? *
4 points
Q10.  Why does x is y return False for x = [1, 2] and y = [1, 2]?   *
4 points
Q11.  What does x is not y mean?   *
4 points
Q12.  Which of the following statements is true? *
4 points
Q13.  Which of the following data types does Python cache for optimization? *
4 points
Q14.  What is the output of the following?
a = True 
b = True 
print(a is b)
*
4 points
Q15.  Why does the code below output False?
a = 500 
b = 500 
print(a is b)
*
4 points
Q16.  Which of these is a correct statement about is and is not operators?   *
4 points
Q17.  What will the following code output?
x = [ ] 
y = [ 
print(x is y)
*
4 points
Q18.  Which of the following is true about is and is not?   *
4 points
Q19.  Which of the following statements about is is incorrect?   *
4 points
Q20.  What happens if you compare two variables with is and they point to the same immutable object?   *
4 points
Submit
Clear form
This content is neither created nor endorsed by Google.