Question 1 of 25
Hints left: 3
Q1
What will be the output of the following Python code? d = {0, 1, 2} for x in d: print(d.add(x))
Q2
What will be the output of the following Python code? d = {0: 'a', 1: 'b', 2: 'c'} for i in d: print(i)
Q3
What will be the output of the following Python code? x = "abcdef" while i in x: print(i, end=" ")
Q4
What will be the output of the following Python code? d = {0, 1, 2} for x in d: print(x)
Q5
What will be the output of the following Python code? d = {0: 'a', 1: 'b', 2: 'c'} for x in d.values(): print(x)
Q6
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): x[i].upper() print (x)
Q7
What will be the output of the following Python code? x = 'abcd' for i in range(x): print(i)
Q8
What will be the output of the following Python code? for i in range(0): print(i)
Q9
What will be the output of the following Python code? x = 'abcd' for i in range(len(x)): print(i)
Q10
What will be the output of the following Python code? x = "abcdef" i = "i" while i in x: print(i, end=" ")
Q11
What will be the output of the following Python code? x = "abcdef" i = "a" while i in x[1:]: print(i, end = " ")
Q12
What will be the output of the following Python code? d = {0: 'a', 1: 'b', 2: 'c'} for x in d.keys(): print(d[x])
Q13
What will be the output of the following Python code? x = 'abcd' for i in x: print(i) x.upper()
Q14
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): i[x].upper() print (x)
Q15
What will be the output of the following Python code? x = 'abcd' for i in x: print(i.upper())
Q16
What will be the output of the following Python code? x = "abcdef" i = "a" while i in x: x = x[1:] print(i, end = " ")
Q17
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): i.upper() print (x)
Q18
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): print(x) x = 'a'
Q19
What will be the output of the following Python code? d = {0: 'a', 1: 'b', 2: 'c'} for x in d.values(): print(d[x])
Q20
What will be the output of the following Python code? x = 'abcd' for i in range(len(x)): print(i.upper())
Q21
What will be the output of the following Python code? x = "abcdef" i = "a" while i in x: x = x[:-1] print(i, end = " ")
Q22
What will be the output of the following Python code? d = {0: 'a', 1: 'b', 2: 'c'} for x, y in d.items(): print(x, y)
Q23
What will be the output of the following Python code? d = {0: 'a', 1: 'b', 2: 'c'} for x, y in d: print(x, y)
Q24
What will be the output of the following Python code? d = {0, 1, 2} for x in d.values(): print(x)
Q25
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): x = 'a' print(x)