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

My brother doesn’t understand his 6th grade work
the clinician is seeing a patient complaining of red eye the clinician suspects conjunctivitis
What are the odd against drawing a G?
How does romantic art compare to neoclassical art?​
“The peace, the freedom, and the security of 90 percent of the population of the world is being jeopardized by the remaining 10 percent who are threatening a br
Explain how Hitler managed to gain virtual dictatorial control over the government
Which of the following characteristics is shared by both plants cells and photosynthetic bacteria
To reduce laboratory​ costs, water samples from twotwo public swimming pools are combined for one test for the presence of bacteria. Further testing is done onl
how do you find the area of a compound figure
why would those who started the french revolution and created the famous “the declaration of rights of man and of the citizen ,”say that the revolution was not