CBSE Class 12 Computer Science Question 43 of 101

Functions — Question 11

Back to all questions
11
Question

Question 11

What will the following function return?

def addEm(x, y, z): 
   print(x + y + z) 
x = y = z = 10
Answer

The function addEm will return None. The provided function addEm takes three parameters: x, y, and z. It calculates their sum, which is 30, and then prints it. However, it doesn't explicitly return any value. In Python, when a function doesn't have a return statement, it implicitly returns None.