ExamVeda
Login
Home
61
What will be the output of the following Python code snippet?
X=”hi”
print(“05d”%X)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
62
A function with parameters cannot be decorated.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
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()
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
64
The output of which of the codes shown below will be: "There are 4 blue birds."?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
65
What will be the output of the following Python code snippet?
'%d %s %g you' %(1, 'hello', 4.0)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
66
What is the purpose of the @classmethod decorator compared to the @staticmethod decorator?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
67
The output of the two codes shown below is the same.
i. bin((2**16)-1)
ii. '{}'.format(bin((2**16)-1))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
68
What will be the output of the following Python code?
'{0:.2f}'.format(1.234)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
69
Which symbol is used to denote a decorator in Python syntax?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
70
Which decorator is used to cache the results of a function call in Python?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board