405,502 views
6 votes
6 votes
8. What's the output of this code?

1
def sum(x, y):
return(x+y)
print(sum (sum(1,2), sum(3,4)))

User Usagi
by
2.9k points

1 Answer

21 votes
21 votes

Answer:

10

Step-by-step explanation:


sum(1,2) = 3\\sum(3,4) = 7\\sum(3,7) = 10\\

Basically, sum((1+2) + (3+4)) = sum(3,7) = (3+7) = 10

User Vamsi Krishna DS
by
2.8k points