Quiz: Coding

To View Tricks: Login Required

Number of Questions: 14

Question: 11 -

what will be output?

  1. class tester:
  2.     def __init__(self, id):
  3.         self.id = str(id)
  4.         id="224"
  5.  
  6. >>>temp = tester(12)
  7. >>>print(temp.id)

Options:
  1. 224

  2. 12

  3. error

  4. none

  5. Answer:

    12

    Solution not available.

Question: 12 -

What will be the output of the following Python function?
min
(max(False,-3,-4), 2,7)

Options:
  1. False

  2. 2

  3. -3

  4. -4

  5. Answer:

    False

    Solution not available.

Question: 13 -

which of the follwing is not a keyword in python?

Options:
  1. pass

  2. eval

  3. assert

  4. non local

  5. Answer:

    eval

    Solution not available.

Question: 14 -

 What will be the output of the following Python code snippet?

for i in [1, 2, 3, 4][::-1]:
    print (i)

Options:
  1. 4 3 2 1

  2. none

  3. error

  4. 1  2 3 4

  5. Answer:

    4 3 2 1

    Solution not available.