Logo

Python Questions Set 72:

Quiz Mode

What is the output of the program?

 math.fact(6)

1
2
3
4

Solution:

What is the output of the following code?

a = repr("Hello")

print(a)

1
2
3
4

Solution:

Which of the following data structures in Python has a key-value pair?

1
2
3
4

Solution:

 

import time
time.asctime()

1
2
3
4

Solution:

What will be the output of the following Python code?

t[5]

1
2
3
4

Solution:

Which type of programming does python support?

1
2
3
4

Solution:

Which of the following is the same as list(map(lambda x: x**-1, [1, 2, 3]))? 

1
2
3
4

Solution:

Which are the advantages of functions in python? 

1
2
3
4

Solution:

What will be the output of the following Python code?

x = ['ab', 'cd']
for i in x:
   x.append(i.upper())
print(x)

1
2
3
4

Solution:

What is the base condition of the recursive function fact(n) shown below?

def fact(n):

    if n==1:

        return 1

    else:

        return n*fact(n-1)

print(fact(4))

1
2
3
4

Solution: