QuestionQ168

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 code block can the data engineer use to complete this task?

Explanation

A Python function uses def to define the function and return x + y to provide the sum to the caller. Printing a sum or writing an expression without return does not return the result.

Community Discussion

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