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

Tom built a fence around his rectangular shaped pool. The posts are 2 yards apart, there are 4 posts along the width and 8 posts along the length. What are the
Which of these sentences characterizes the regulatory mechanisms of gene expressions in organisms?
What strength of the continental army was significant to its ultimate victory?
What type of feeding does the rhizopus have?
Which of the following terms reflects Alexander Hamilton's broad interpretation of the Constitution: limited construction, strict construction, loose constructi
Which sentence in the US Constitution provides for limiting the power of government? A “All persons born or naturalized in the United States . . . are citizens
what is 2 times 3/8? explain how you know
Which of the following is a perfect cube? 4 8 9 12
If a satellite or spaceship explodes in outer space, you can see the explosion from a distance but you cannot hear it. Why? A) Light waves travel very fast and
Find the measure of angle x in the figure below: 65° 70° 110° 125°