96,035 views
17 votes
17 votes
Write the definition of the function add, that receives two integer parameters and returns their sum

User Abelenky
by
2.5k points

1 Answer

26 votes
26 votes

Answer:

Here is the definition of the function add that receives two integer parameters and returns their sum:

def add(x, y):

return x + y

result = add(3, 5) # result will be 8

User Watzon
by
3.0k points