skip
continue
break
pass
assert
for
while
if
exit
range()
input()
len()
list()
What is the output of following code
print( 5 in 515)
True
False
TypeError
ValueError
What will be the output?
x = 10 y = x x = 20 print(y)
10
20
Error
None
+
*
**
//
What is the output?
x = 5 print(bool(x))
5
print(2 ** 3 ** 2)
64
512
256
36
What will be the output of the following Python code?
x = ['ab', 'cd'] for i in x: i.upper() print(x)
[‘ab’, ‘cd’]
[‘AB’, ‘CD’]
[None, None]
none of the mentioned
x = "abcdef" i = "a" while i in x: x = x[:-1] print(i, end = " ")
i i i i i i
a a a a a a
a a a a a
x = "abcdef" i = "a" while i in x[:-1]: print(i, end = " ")
a a a a a a … infinite Time
a
x = "abcdef" i = "a" while i in x: x = x[1:] print(i, end = " ")
no output
error
x = 'abcd' for i in x: print(i) x.upper()
a B C D
a b c d
A B C D
What will be the output of the following Python code snippet?
x = 'abcd' for i in range(len(x)): x[i].upper() print (x)
abcd
ABCD
d = {0: 'a', 1: 'b', 2: 'c'} for i in d: print(i)
0 1 2
a b c
0 a 1 b 2 c
d = {0: 'a', 1: 'b', 2: 'c'} for x in d.keys(): print(d[x])
d = {0: 'a', 1: 'b', 2: 'c'} for x in d.values(): print(x)