Logo

Python Questions Set 97:

Quiz Mode

Which is not a keyword?

1
2
3
4

Solution:

 Given a string example=” hello” what is the output of example.count(‘l’)? 

1
2

Solution:

Which of the following operators checks the equality of two operands?

1
2
3
4

Solution:

 Only problems that are recursively defined can be solved using recursion

1
2

Solution:

 

What will be the output of the following Python code?

print('ab12'.isalnum())

1
2

Solution:

What is a correct syntax for importing library in python ? 

1
2
3
4

Solution:

  Which of the following functions returns a value in degrees, counterclockwise from the horizontal right? 

1
2
3
4

Solution:

What will be the output of the following Python code?

>>> a = {1, 2, 3}
>>> a.intersection_update({2, 3, 4, 5})
>>> a

1
2
3
4

Solution:

 What is tail recursion? 

1
2
3
4

Solution:

What will be the output of the following Python code?

class A:
   def __init__(self):
       self.multiply(15)
       print(self.i)
 
   def multiply(self, i):
       self.i = 4 * i;
class B(A):
   def __init__(self):
       super().__init__()
 
   def multiply(self, i):
       self.i = 2 * i;

1
2
3
4

Solution: