SREE GOKULAM PUBLIC SCHOOL
CH-FUNCTIONS
1) If the return statement is not used in the function
then which type of value will be returned by the
function?
a) int b) str c) float d) None
2) What is the minimum and maximum value of c
in the following code snippet?
import random
a = [Link](3,5)
b = [Link](2,3)
c=a+b
print(c)
a) 3 , 5 b) 5, 8 c) 2, 3 d) 3, 3
3) In python function, the function calling another
function is known as ______and the function being 9)
called is known ___________
a) main, keyword b) caller, called
c) called, caller d) executer, execute 10) Predict the output of the following code
def func1(list1):
4) What will be the output of the following code ? for x in list1:
print(“100+200”) print([Link](),end=”#”)
a)300 b) 100200 c) 100+200 d) 200 func1([‘New’,’Dehli’])
A. [New,Dehli] B. new#dehli# C.
5) What is returned by int([Link](3, 2))?
newdehli# D. New#Dehli#
a) 6 b) 9 c) error, third argument
required d) error, too many arguments
11) What will be the output of the following python
6) Give the output code:
def fun(): def mul (num1, num2):
global a x = num1 * num2
a=10 x = mul(20,30)
print(a) A. 600 B. None C. No Output D. 0
a=5 12) Which of the following function header is Correct :
fun() A. def fun(x=1,y) B. def fun(x=1,y,z=2)
print(a) C. def fun(x=1,y=1,z=2) D. def fun(x=1,y=1,z=2,w)
a) 10 b) 5 c) 5 d) 10
10 10 5 5
7) Which of the following function header is correct
a) def mul(a=2, b=5,c) b) def mul(a=2, b, c=5)
c) def mul(a, b=2, c=5) d) def mul(a=2, b, c=5)
8)
a) 9 b)3 c)27 d) 30 13)
18)
14)
19
15)
20)
16)
17)