X=”hi”
print(“05d”%X)Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
82
Questions
4/5
Page
Pick an option on a question to see the right answer and solution.
X=”hi”
print(“05d”%X)Select an option to see the answer and solution.
Select an option to see the answer and solution.
def mk(x):
def mk1():
print("Decorated")
x()
return mk1
def mk2():
print("Ordinary")
p = mk(mk2)
p()Select an option to see the answer and solution.
Select an option to see the answer and solution.
'%d %s %g you' %(1, 'hello', 4.0)Select an option to see the answer and solution.
Select an option to see the answer and solution.
i. bin((2**16)-1)
ii. '{}'.format(bin((2**16)-1))Select an option to see the answer and solution.
'{0:.2f}'.format(1.234)Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
'%s' %((1.23,),)Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
print("%-06d"%x)Select an option to see the answer and solution.
def f(x):
def f1(*args, **kwargs):
print("*", 5)
x(*args, **kwargs)
print("*", 5)
return f1
@f
def p(m):
p(m)
print("hello")Select an option to see the answer and solution.
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")Select an option to see the answer and solution.
'The {} side {1} {2}'.format('bright', 'of', 'life')Select an option to see the answer and solution.
a='hello'
q=10
vars()Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.