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

Why did the business tycoons put their support behind William McKinley? Were they they successful
What is the cost of a necklace that regularly costs $49.98?
How was the japanese soldier depicted in this poster
Sara has 10 apples and four bannas she gives Peter 2 apples how many do Sara has left
Find the equation of the straight line passing through the point (0, 1) which is perpendicular to the line y = -2x + 2
daniel works at nearby elections store. He makes of 15% on everything he sells . if he sells a laptop for $293.00 , how much money does daniel make in commissio
"your president may easily become a kind. your Senate so imperfectly constructed that your dearest rights may become sacrificed by what might be a small minorit
When you see a _____, slow down and pay special attention to conditions around the intersection as you pass through it. A.flashing yellow lights B.flashing red
What was life like during the Paleolithic age?
Jacob is standing 112 m from a building. The angle of elevation from where he is standing on the ground to the top of the building is 62°.How tall is the buildi