Q. what will be the output of the following
Python code snippet?
def example(a):
a = a + '2'
a = a*2
return a
>>>example("hello")

  • (A) indentation error
  • (B) cannot perform mathematical operation on strings
  • (C) hello2
  • (D) hello2hello2
πŸ’¬ Discuss
βœ… Correct Answer: (A) indentation error
Explanation: python codes have to be indented properly.

Explanation by: Ranjeet
python codes have to be indented properly.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
616
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Ranjeet
Publisher
πŸ“ˆ
94%
Success Rate