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 is equivalent to 2^5?
Determine the axis of symmetry of the parabola with x-intercepts at (4, 0) and (12, 0)
A negative externality or spillover cost occurs when Group of answer choices firms fail to achieve productive efficiency. firms fail to achieve allocative eff
What analysis feature of a decision support system (DSS) pinpoints the region that generated the highest total sales
A 3.0-liter sample of an ideal gas is at a pressure of 2.5 atm at 15oC. (i) How many moles of gas are in the sample? (ii) If the volume does not change, what is
What is the total value of digit 7 in the number 32.8794​
a package is accidentally dropped from a helicopter from a height of 3,136ft. if the equation for height as a function of time is h(t) = -16t^2 + initial height
Given that u=4,t=5,a=10and s=it+1\2at
__________aggregate customers' opinions related to products or services that they have purchased and then suggest them to others with the same interest.
Calculate the molality of a solution containing 22.75 g of glycerol (C3H8O3) in 79.6 g of ethanol (C2H5OH).