ExamVeda
Login
Home
71
What will be the output of the following Python code?
'%s' %((1.23,),)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
72
What is the primary purpose of the functools.partial function in Python?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
73
Which of the following is used to format a string with left-aligned text within a field?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
74
What will be the output of the following Python expression if x=456?
print("%-06d"%x)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
75
What will be the output of the following Python code?
def f(x):
    def f1(*args, **kwargs):
        print("*", 5)
        x(*args, **kwargs)
        print("*", 5)
    return f1
@f
def p(m):
    p(m)
print("hello")
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
76
What will be the output of the following Python code?
def f(x):
    def f1(*args, **kwargs):
        print("*"* 5)
        x(*args, **kwargs)
        print("*"* 5)
    return f1
def a(x):
    def f1(*args, **kwargs):
        print("%"* 5)
        x(*args, **kwargs)
        print("%"* 5)
    return f1
@f
@a
def p(m):
    print(m)
p("hello")
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
77
What will be the output of the following Python code?
'The {} side {1} {2}'.format('bright', 'of', 'life')
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
78
What will be the output of the following Python code snippet?
a='hello'
q=10
vars()
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
79
In Python, what does the expression {:#x} do in a formatted string?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
80
Which format specifier is used to represent an integer in binary form in a formatted string?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board