What will be the output of the following Python code? s='%s, %s & %s' s%('mumbai', 'kolkata', 'delhi') a) ...
View Question
What will be the output of the following Python code?
s='{0}, {1}, and {2}’
s.format(‘hello’, ‘good’, ‘morning’)
What will be the output of the following Python code? s='{0}, {1}, and {2}' s.format('hello', 'good', 'morning') a) ...
View Question
What will be the output of the following Python code snippet?
a=’hello’
q=10
vars()
What will be the output of the following Python code snippet? a='hello' q=10 vars() a) ...
View Question
What will be the output of the following Python code snippet?
‘%(qty)d more %(food)s’ %{‘qty’:1, ‘food’: ‘spam’}
What will be the output of the following Python code snippet? '%(qty)d more %(food)s' %{'qty':1, 'food': 'spam'} a) ...
View Question
What will be the output of the following Python code snippet?
x=3.3456789
‘%s’ %x, str(x)
What will be the output of the following Python code snippet? x=3.3456789 '%s' %x, str(x) a) Error
View Question
What will be the output of the following Python code snippet?
x=3.3456789
‘%-6.2f | %05.2f | %+06.1f’ %(x, x, x)
What will be the output of the following Python code snippet? x=3.3456789 '%-6.2f | %05.2f | %+06.1f' %(x, ...
View Question
What will be the output of the following Python code snippet?
x=3.3456789
‘%f | %e | %g’ %(x, x, x)
What will be the output of the following Python code snippet? x=3.3456789 '%f | %e | %g' %(x, ...
View Question
What will be the output of the python code shown below for various styles of format specifiers?
x=1234
res=’integers:…%d…%-6d…%06d’ %(x, x, x)
res
What will be the output of the python code shown below for various styles of format specifiers? x=1234
View QuestionThe output of which of the codes shown below will be: “There are 4 blue birds.”?
a) ‘There are %g %d birds.’ %4 %blue b) ‘There are %d %s birds.’ %(4, blue)
View Question
What will be the output of the following Python code snippet?
‘%d %s %g you’ %(1, ‘hello’, 4.0)
What will be the output of the following Python code snippet? '%d %s %g you' %(1, 'hello', 4.0)
View Question