CBSE Class 12 Computer Science Question 39 of 103

Working with Functions — Question 15

Back to all questions
15
Question

Question 15

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
Answer

indentation error

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