python-examples

Getting Started with Python - MCQS

Questions

  1. What is the other name for tuple assignment? unpacking
  2. In unpacking what is the important condition? The number of variables on the left-hand side and the number of elements in the tuple should be equal.

MCQs

  1. What will be the output of the following code?

if 5 > 2:

print(“5 is greater than 2”)

>**a.** Syntax Error

**b.**  5 is greater than 2
  1. What will be the output of the following code?

if 5 > 2:

print(“5 is greater than 2”)

>**a.** Syntax Error

**b.**  5 is greater than 2