CBSE Class 12 Computer Science Question 72 of 103

Working with Functions — Question 5

Back to all questions
5
Question

Question 4

What will the following function return ?

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

The function addEm will return None. The provided function addEm takes three parameters x, y, and z, calculates their sum, and then prints the result. However, it doesn't explicitly return any value. In python, when a function doesn't have a return statement, it implicitly returns None. Therefore, the function addEm will return None.