Logo

Python Questions Set 107:

Quiz Mode

What is the output of:

"Romeo Juliet".isalnum()

Solution:

___() method returns a list of all entities present in a module.

Solution:

Which of the following is a micro-framework of Python?

1
2
3
4

Solution:

What is the output of the following code?


num = 0x548

print(num)

1
2
3
4

Solution:

What is the output of the following Python code?

a = dict([(1, 2), (3, 4)])

print(a)

1
2
3
4

Solution:

 

What will be the output of the following Python code?

a=[10,23,56,[78]]
b=list(a)
a[3][0]=95
a[1]=34
print(b)

1
2

Solution:

What is the output of the following code?


from itertools import takewhile


n = [2, 4, 6, 8, 10]

x = takewhile(lambda i: i % 2 == 0, n)

print(x)

1
2
3
4

Solution:

What will be the output of the following Python code? 

def fun(n):  

    if (n > 100):  

        return n - 5  

    return fun(fun(n+11));   

print(fun(45))

1
2
3
4

Solution:

What data types can be used as keys in a Python dictionary?

1
2
3
4

Solution:

 Which of these is false about recursion? 

1
2
3
4

Solution: