WorksheetsOOP module
Total questions: 10
Worksheet time: 5mins
What is a library in python?
Collection of files
Collection of Modules
It is Subprogram
Name of a file
What will be the output of the following
from import factorial
print(math.factorial(5))
25
10
120
error bcz factorial is not a module in math
Which of the statements is used to import all names from a module into the current calling module
import
from
dir()
import*
Name the keyword used to define a function.
define
def
function
fu
Which one is not true about function?
It breaks the large program into small modules.
It avoids repetition.
It makes code reusable.
It makes the program unorganized.
What will be the output of the following Python code?
def cube(x):
return x * x * x
x = cube(3)
print (x)
9
3
27
30
What are the two main types of functions?
Custom function
Built-in function & User defined function
User function
System function
