What will be the output of the following Python code? x = "abcdef" i = "a" while i ...
View Question
What will be the output of the following Python code?
x = “abcdef”
i = “i”
while i in x:
print(i, end=” “)
What will be the output of the following Python code? x = "abcdef" i = "i" while i ...
View Question
What will be the output of the following Python code?
x = “abcdef”
while i in x:
print(i, end=” “)
What will be the output of the following Python code? x = "abcdef" while i in x: ...
View Question
What will be the output of the following Python code?
i = 0
while i < 3:
print(i)
i += 1
else:
print(0)
What will be the output of the following Python code? i = 0 while i < 3: ...
View Question
What will be the output of the following Python code?
i = 0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)
What will be the output of the following Python code? i = 0 while i < 5: ...
View Question
What will be the output of the following Python code?
‘%s’ %((1.23,),)
What will be the output of the following Python code? '%s' %((1.23,),) a) ‘(1.23,)’ b) ...
View Question
What will be the output of the following Python code?
‘%.2f%s’ % (1.2345, 99)
What will be the output of the following Python code? '%.2f%s' % (1.2345, 99) a) ...
View Question
What will be the output of the following Python code?
‘{0:f}, {1:2f}, {2:05.2f}’.format(1.23456, 1.23456, 1.23456)
What will be the output of the following Python code? '{0:f}, {1:2f}, {2:05.2f}'.format(1.23456, 1.23456, 1.23456) a) ...
View Question
What will be the output of the following Python code?
‘The {} side {1} {2}’.format(‘bright’, ‘of’, ‘life’)
What will be the output of the following Python code? 'The {} side {1} {2}'.format('bright', 'of', 'life') a) ...
View Question
What will be the output of the following Python code?
‘{a}{b}{a}’.format(a=’hello’, b=’world’)
a) ‘hello world’
b) ‘hello’ ‘world’ ‘hello’
c) ‘helloworldhello’
d) ‘hello’ ‘hello’ ‘world’
What will be the output of the following Python code? '{a}{b}{a}'.format(a='hello', b='world') a) ‘hello world’ b) ...
View Question