61. What will be the output of the following Python code snippet?
X=”hi”
print(“05d”%X)
X=”hi”
print(“05d”%X)
62. A function with parameters cannot be decorated.
63. In the following Python code, which function is the decorator?
def mk(x):
def mk1():
print("Decorated")
x()
return mk1
def mk2():
print("Ordinary")
p = mk(mk2)
p()
def mk(x):
def mk1():
print("Decorated")
x()
return mk1
def mk2():
print("Ordinary")
p = mk(mk2)
p()
64. The output of which of the codes shown below will be: "There are 4 blue birds."?
65. What will be the output of the following Python code snippet?
'%d %s %g you' %(1, 'hello', 4.0)
'%d %s %g you' %(1, 'hello', 4.0)
66. What is the purpose of the @classmethod decorator compared to the @staticmethod decorator?
67. The output of the two codes shown below is the same.
i. bin((2**16)-1)
ii. '{}'.format(bin((2**16)-1))
i. bin((2**16)-1)
ii. '{}'.format(bin((2**16)-1))
68. What will be the output of the following Python code?
'{0:.2f}'.format(1.234)
'{0:.2f}'.format(1.234)