Q.1
What will be the output of the following Python code? x = 'abcd' for i in x: print(i) x.upper()
  • a) a B C D
  • b) a b c d
  • c) A B C D
  • d) error
Q.2
What will be the output of the following Python code? x = 'abcd' for i in x: print(i.upper())
  • a) a b c d
  • b) A B C D
  • c) a B C D
  • d) error
Q.3
What will be the output of the following Python code? x = 'abcd' for i in range(x): print(i)
  • a) a b c d
  • b) 0 1 2 3
  • c) error
  • d) none of the mentioned
Q.4
What will be the output of the following Python code? x = 'abcd' for i in range(len(x)): print(i)
  • a) a b c d
  • b) 0 1 2 3
  • c) error
  • d) 1 2 3 4
Q.5
What will be the output of the following Python code? x = 'abcd' for i in range(len(x)): print(i.upper())
  • a) a b c d
  • b) 0 1 2 3
  • c) error
  • d) 1 2 3 4
Q.6
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): i.upper() print (x)
  • a) a b c d
  • b) 0 1 2 3
  • c) error
  • d) none of the mentioned
Q.7
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): x[i].upper() print (x)
  • a) abcd
  • b) ABCD
  • c) error
  • d) none of the mentioned
Q.8
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): i[x].upper() print (x)
  • a) abcd
  • b) ABCD
  • c) error
  • d) none of the mentioned
Q.9
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): x = 'a' print(x)
  • a) a
  • b) abcd abcd abcd
  • c) a a a a
  • d) none of the mentioned
Q.10
What will be the output of the following Python code snippet? x = 'abcd' for i in range(len(x)): print(x) x = 'a'
  • a) a
  • b) abcd abcd abcd abcd
  • c) a a a a
  • d) none of the mentioned
0 h : 0 m : 1 s