Q. What will be the output of the following Python code snippet?

Code:
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

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
233
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Kirti
Publisher
πŸ“ˆ
91%
Success Rate