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

How did the united states help rebuild european cities and increase prosperity at home after world war ii?
Which of the following illustrates one of the three questions of economics?
For amanda's trip to chicago, she boarded a train in omaha and rode 805 km to chicago. on returning, she took the same train and route back to omaha. what dista
a low credit score can lead to
removed this question
(true or false) Considering costs versus benefits is similar to comparing the pros and cons of a situation
what roles did england and spain play in religious conflict
To convert 0.73 hours into minutes which ratio would you multiply by. a 1 minute/ 60 hours
According to locke, when do people have the right to overthrow a government?
3x/sqrt 4x+5 rationalize the denominator