QuestionQ59

VerifiedDevelopment and Ingestion

A data engineer who is new to Python needs to create a Python function that adds two integers and returns their sum.

Which of the following code blocks can the data engineer use to accomplish this task?

Explanation

In Python, a function is declared with def, and return x + y sends the sum of the two integer arguments back to the caller. Printing the sum does not return it.

Community Discussion

No comments yet. Be the first to start the discussion!