KnowledgeBoat Logo

Computer Science

Carefully observe the code and give the answer.

def function1(a):
    a = a + '1'
        a = a * 2
>>>function1("hello")
  1. indentation Error
  2. cannot perform mathematical operation on strings
  3. hello2
  4. hello2hello2

Python Functions

3 Likes

Answer

indentation error

Reason — The line a = a * 2 should be indented backwards otherwise it will give an error.

Answered By

1 Like


Related Questions