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

Can you change 13/6 into a mix number?
What is 11.3333333333 as a mixed number?
5 out of 7 students voted to paint the benches. a total of 185 voted to paint the benches. how many students voted?
Identify the three broad categories of property covered by the Building and Personal Property Coverage form, also referred to as the BPP.
What is AE ? Enter your answer in the box. units:
Why then does the accident at the funeral cause unprecedented confusion
What might students en la fiesta del Club de Español be seen eating? a. tomamos c. juntos b. el viernes d. una merienda
What is England’s William Shakespeare’s famous for worldwide? HURRY
Which type of employee would most likely spend the majority of work time sitting in a cubicle? an online class designer a foreign-language tutor a public high s
What is the most abundant chemical sedimentary rock in earth's crust?