Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer
Q. } and {1}".format('foo', 'bin'))
a. hello foo and bin
b. hello {0} and {1} foo bin
c. error
d. hello 0 and 1
Q. } and {0}".format('bin', 'foo'))
a. hello foo and bin
b. hello bin and foo
c. error
d. none of the mentioned
Q. } and {name2}".format( 'foo', 'bin'))
a. hello foo and bin
b. hello {name1} and {name2}
c. error
d. hello and
Q. } and {name2}".format( name1='foo', name2='bin'))
a. hello foo and bin
b. hello {name1} and {name2}
c. error
d. hello and
Q. !r} and {0!s}".format('fo o', 'bin'))
a. hello foo and foo
b. hello ‘foo’ and foo
c. hello foo and ‘bin’
d. error
Q. } and {1}".format(('foo', 'bin')))
a. hello foo and bin
b. hello (‘foo’, ‘bin’) and (‘foo’, ‘bin’)
c. error
d. none of the mentioned
Q. [0]} and {0[1]}".format(( 'foo', 'bin')))
a. hello foo and bin
b. hello (‘foo’, ‘bin’) and (‘foo’, ‘bin’)
c. error
d. none of the mentioned
Q. , 10, 12))
a. the sum of 2 and 10 is 12
b. error
c. the sum of 0 and 1 is 2
d. none of the mentioned
Q. , 10, 12))
a. the sum of 2 and 10 is 12
b. the sum of 10 and a is 14
c. the sum of 10 and a is c
d. error