ExamVeda
Login
Home
41
What will be the output of the following Python code?
D=dict(p='Exam', q='Veda')
'{p}{q}'.format(**D)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
42
What will be the output of the following Python code?
'{a}{b}{a}'.format(a='hello', b='world')
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
43
In Python, what is the role of the @functools.lru_cache decorator?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
44
What is the purpose of a decorator in Python?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
45
What will be the output of the following Python code snippet?
x=3.3456789
'%f | %e | %g' %(x, x, x)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
46
Which of the following formatting options can be used in order to add 'n' blank spaces after a given string 'S'?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
47
What will be the output of the following Python code?
s='%s, %s & %s'
s%('mumbai', 'kolkata', 'delhi')
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
48
In Python, what is the primary use of the super() function in a subclass constructor?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
49
In Python, what is the purpose of the @property decorator?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
50
What will be the output of the following Python code?
def ordi():
	print("Ordinary")
ordi
ordi()
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board