Logo

Python Questions Set 3:

Quiz Mode

___________() method is used to read a single line from a file.

Solution:

a = 2

b = 1

c = a # b

print(c)

1
2
3
4

Solution:

What is returned by a function that does not have a return statement?

1
2
3
4

Solution:

 

What will be the output of the following Python code?

def foo():
   return total + 1
total = 0
print(foo())

1
2
3

Solution:

Which Python module provides the functions used for interacting with the operating system?

1
2
3
4

Solution:

How to inherit other class in python ?

1
2
3
4

Solution:

Which of the following commands will create a list? 

1
2
3
4

Solution:

What can class objects support?

1
2
3
4

Solution:

What is the purpose of *args in Python?

1
2
3
4

Solution:

Which of these is not true about recursion? 

1
2
3
4

Solution: