Logo

Python Questions Set 96:

Quiz Mode

Is it a list?


li=(10,'Abekus',20)

1
2

Solution:

Output of following statements


complex(5,-4)

1
2
3
4

Solution:

Who is the founder of Python?

1
2
3

Solution:

 What is called when a function is defined inside a class? 

1
2
3
4

Solution:

Retrieving objects from the stored string form is called ______.

1
2
3
4

Solution:

Which of the following expressions can be used to multiply a given number ‘a’ by 4? 

1
2
3
4

Solution:

 

What will be the output of the following Python code?

>>> a=[14,52,7]
>>>> b=a.copy()
>>> b is a

1
2

Solution:

>>> try:
...     raise KeyboardInterrupt
... finally:
...     print('Goodbye, world!')

1
2
3
4

Solution:

 

What Is The Output Of The Following Code Snippet?

def test_var_args(param1, **kwargs):
  print (type(kwargs))

test_var_args('capitals', India='New Delhi',
Australia='Canberra', China='Beijing')

1
2
3
4

Solution:

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

my_string = "hello world"
k = [(i.upper(), len(i)) for i in my_string]
print(k)

1
2
3
4

Solution: