71. What are the two main types of functions in Python?
72. What is output of print(math.pow(3, 2))?
73. What will be the output of the following Python program?
def addItem(listParam):
listParam += [1]
mylist = [1, 2, 3, 4]
addItem(mylist)
print(len(mylist))
def addItem(listParam):
listParam += [1]
mylist = [1, 2, 3, 4]
addItem(mylist)
print(len(mylist))
74. Which of the following statements is used to create an empty set in Python?
75. Which of the following is a feature of Python DocString?
76. Which of the following Python statements will result in the output: 6?
A = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
A = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
77. What will be the output of the following Python code?
print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))
print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))
78. What will be the output of the following Python code snippet if x=1?
x<<2
x<<2
79. What will be the output of the following Python code?
class tester:
def __init__(self, id):
self.id = str(id)
id="224"
>>>temp = tester(12)
>>>print(temp.id)
class tester:
def __init__(self, id):
self.id = str(id)
id="224"
>>>temp = tester(12)
>>>print(temp.id)
80. What are the values of the following Python expressions?
2**(3**2)
(2**3)**2
2**3**2
2**(3**2)
(2**3)**2
2**3**2