51. What will be the output of the following Python code?
hex(255), int('FF', 16), 0xFF
hex(255), int('FF', 16), 0xFF
52. What is the primary use of the @final decorator in Python?
53. What will be the output of the following Python code?
'%.2f%s' % (1.2345, 99)
'%.2f%s' % (1.2345, 99)
54. What is the role of the @abstractmethod decorator in Python?
55. What will be the output of the following Python code snippet?
'%(qty)d more %(food)s' %{'qty':1, 'food': 'spam'}
'%(qty)d more %(food)s' %{'qty':1, 'food': 'spam'}
56. What does the * symbol do when used in a function's parameter list?
57. What will be the output of the following Python code snippet?
X=”Exam-Veda”
print(“%56s”,X)
X=”Exam-Veda”
print(“%56s”,X)
58. What will be the output of the following Python function?
def f(p, q):
return p%q
f(0, 2)
f(2, 0)
def f(p, q):
return p%q
f(0, 2)
f(2, 0)
59. What is the output of the code: print("{:.2f}".format(3.14159))?
60. What will be the output of the following Python expression if x=56.236?
print("%.2f"%x)
print("%.2f"%x)