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

Evaluate the function rule for the given value. y = 6 ∙ 2x for x = –2
Jeffrey walked 1/3 mile on Monday and jogged 3/4 mile on Tuesday. How far did he walk and jog on Monday and Tuesday combined? Use the tiles to complete the frac
Read the following passage from a myth. Odysseus, the great hero, was lost at sea for many years. While he was gone, his wife faithfully waited for him. She
Steps to solve this equation.
36 is 40% of what number ?
Jose had a small bag of marshmallows. The bag contained 5 pink, 6 blue, 7 orange, 9 yellow, and 3 green marshmallows. He picked one of the marshmallows from the
From this passage the reader can tell that the speaker, Huck Finn, values A) the law, the courts, and the government. B) freedom, plain-spoken speech, and mis
Can someone please help me with this question?
Which statement uses the correct MLA in-text citation? A. Aaliyah Hassari, author of Under the Desert Sands, points to the population growth as a major cau
A single strand of DNA helix consists of 100 nitrogenous base pairs. On one strand, 36 of the bases are adenine and 24 are cytosine. For the complimentary stran