Python Variable MCQs

Question 1: Which of the following defines a variable in Python?

Question 2: How to get the type of the following variable?

i=10

Question 3: What is the output of the following code?

s1={1,2,3,4}
s2={4,5,6,7}
print(s1&s2)

Question 4: What is the output of the following code?

>>> x=100
>>> type(x)

Question 5: What is the output of the following code?

>>> x='Hello '
>>> y='World'
>>> x+y

Question 6: What is the output of the following code?

>>> x=100
>>> y=100
>>> id(x) == id(y)

Question 7: Which of the following would give a syntax error?

Question 8: Which of the following statements are correct?

Question 9: What will be the output of the following code?

x=10
y=20
x, y = y,x
print(x,y)

Question 10: Which of the following symbols stores the result of the last evaluation?