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

Which sentence has a misplaced adjective phrase? a. The antique chair in the dining room is creaky. b. The old antique shops along Main Street are fun to expl
What is the solution to the equation? 32 - 6x + 7x = -15 + 28 X =??
How much more money do 10 T-shirts cost that 6 T-shirts? Explian how you found your answer.
Lee and Celia are lab partners. While Celia pours a chemical into a graduated cylinder, some of the chemical splashes onto her arm. What should happen next?
The Constitution creates different lengths of terms for representatives and senators. Write two to four sentences that explain the pros and cons of shorter and
isaiash puts a 10 gram weight on a pan balance. how many 1gram weights does he need to balance the scale?
2. The four main systems of the Earth are
The first inhabitants of Oceania are believed to have come from which continent? Europe Asia Africa South America
in which ways did taft helped conservation efforts and child labor problems
how to simplify 7m-2m