# Exercise: Questions on Functions

Questions on Functions : Question 1 :
What will be the output of the following code :
```print type(type(int))
```

 type 'int' type 'type'  Correct Error 0
Questions on Functions : Question 2 :
What is the output of the following code :
```L = ['a','b','c','d']
print "".join(L)
```

 Error None abcd  Correct [‘a’,’b’,’c’,’d’]
Questions on Functions : Question 3 :
What is the output of the following segment :
```chr(ord('A'))
```

 A  Correct B a Error
Questions on Functions : Question 4 :
What is the output of the following program :
```y = 8
z = lambda x : x * y
print z(6)
```

 48  Correct 14 64 None of the above
Questions on Functions : Question 5 :
What is called when a function is defined inside a class?

 Module Class Another Function Method  Correct
Questions on Functions : Question 6 :
Which of the following is the use of id() function in python?

 Id returns the identity of the object  Correct Every object doesn’t have a unique id All of the mentioned None of the mentioned
Questions on Functions : Question 7 :
What is the output of the following program :
```import re
sentence = 'horses are fast'
matched = re.search(regex, sentence)
print(matched.groupdict())
```

 {‘animal’: ‘horses’, ‘verb’: ‘are’, ‘adjective’: ‘fast’}  Correct (‘horses’, ‘are’, ‘fast’) ‘horses are fast’ ‘are’
Questions on Functions : Question 8 :
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.pop(1)?

 [3, 4, 5, 20, 5, 25, 1, 3] [1, 3, 3, 4, 5, 5, 20, 25] [3, 5, 20, 5, 25, 1, 3]  Correct [1, 3, 4, 5, 20, 5, 25]