K

Kirti • 10.45K Points
Tutor II

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
  • Correct Answer - Option(A)
  • Views: 143
  • Filed under category Python

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics