KnowledgeBoat Logo
|

Computer Science

What will be the output displayed when addEM() is called/executed?

def addEM(x, y, z): 
    return x + y + z 
x=y=z=20

Python Functions

2 Likes

Answer

When the addEM() function is called or executed, there will be no output displayed because there is no print statement.

Explanation

When the function addEM(x, y, z) is called with the values 20 for each of its parameters (x, y, and z), it calculates their sum (20 + 20 + 20), which equals 60. Since the function uses the return keyword to return this calculated sum, calling addEM(20, 20, 20) will return 60.

Answered By

3 Likes


Related Questions