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

is [tex]y = x^{2}[/tex] a linear equation? NEED EXPLAINATION
The poetic interpretation of the twist is written in
what is ATP in simple terms?
A membrane that only "lets" certain molecules in while keeping other molecules out is ___ ___.
what is the common ratio of the geometic sequence whose second and forth terms are 6 and 54, respectively? a) 1b) 2c) 3d) 4​
jack plans to run 15 miles.he ran 493/40 miles and then stopped for a snack. how many miles does he have left?
How did Mussolini and hitler work to make their nations strong after world war 1
Which equation represents an exponential function with an initial value of 500 ?
find the degree of -5w cubed - 4w squared + 7w + 16
Which statement best shows the difference between romantic and realist literature? A. Romanticism depicts people in love, whereas realism depicts the real nat