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

Solve each equation. |x+5|=-3
Plot the point on this function with an x-value of 6. What is the y-value of this point?
373646351636646475753626266374747574884x848484893990299149440505944330309877=?
373646351636646475753626266374747574884x848484893990299149440505944330309877=?
Help with is ixl please
What is the sum of the matrices shown below? 3 6 0 9 5 -2 + 6 0 -8 4 =
Josh rented a truck for one day there was a base fee fee of $12 and there was additional charge of 8 cents for each mile driven the total cost (c) for driving
Help me with ixl please
Crates of masses 1 kg , 4 kg , and 6 kg are placed in a line on a frictionless table. They remain in contact as they are pushed by a 60 N force applied to the 1
Solve the system of equations below by graphing. Type in the ordered pair (x,y) for your answer y=-2 x+y=5