Quiz: Coding

To View Tricks: Login Required

Number of Questions: 14

Question: 6 -

Python supports the creation of anonymous functions at runtime, using a construct called

Options:
  1. anonymous

  2. pi

  3. none

  4. lambda

  5. Answer:

    lambda

    Solution not available.

Question: 7 -

2**(3**2)
(2**3)**2
2**3**2

Options:
  1.  512, 512, 512

  2. 512, 64, 512

  3. 64, 64, 64

  4. 64, 512, 64

  5. Answer:

    512, 64, 512

    Solution not available.

Question: 8 -

What will be the output of the following Python code snippet if x=1?

x<<2

Options:
  1. 8

  2. 2

  3. 1

  4. 4

  5. Answer:

    4

    Solution not available.

Question: 9 -

What will be the output of the following Python code?

i = 1
while True:
    if i%3 == 0:
        break
    print(i)
 
    i + = 1

Options:
  1. error

  2. none

  3. 1 2 3

  4. 1 2

  5. Answer:

    error

    Solution not available.

Question: 10 -

which keyword is used for function in python language?

Options:
  1. function

  2. def

  3. define

  4. fun

  5. Answer:

    def

    Solution not available.