windinthetrees windinthetrees
  • 02-04-2021
  • Computers and Technology
contestada

8. What's the output of this code?
1
def sum(x, y):
return(x+y)
print(sum (sum(1,2), sum(3,4)))

Respuesta :

HonoraryPhd
HonoraryPhd HonoraryPhd
  • 02-04-2021

Answer:

10

Explanation:

[tex]sum(1,2) = 3\\sum(3,4) = 7\\sum(3,7) = 10\\[/tex]

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

Answer Link

Otras preguntas

Help me plzzzz (x+1)^2 -3(x+2) If you could give an explanation that would be great!
Find the product of ( x + 4) (x^2 + 3x + 2). QUICK
6 tenths times 8(please help)​
What are the main reasons given for the early colonists coming to America?
Write a scary story (third person narrative)
Describe the transformation in words only for 4 please :)
Write the equation for the quadratic function in the graph.
The number of viewers of a television station in 2003 was 640000. (a) In 2004, the station had 716800 viewers. Calculate the percentage increase in the number o
What was Anna doing the evening before she died? Trying to finish up and overdue lab report Setting up a lab for Dr. Opal Tutoring a classmate who had fallen be
Please help ASAP!!!!!!!!