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

2-3 facts about Warsaw Pact
The Habsburg Empire did all of the following EXCEPT A. take control of Hungary, Croatia, and Slovonia. B. lose their Holy Roman Empire in Germany. C. remain a c
let g(x)=x-3 and h(x)=x^2+6 find (h o g) (1)
I just need the equation on how to do it. I'm so lost :'( help please!!!!!!
If f(x) is 4x-3 what is (f^-1of) (10)
wats the 60% off a prize that is $20.00
Hey, need some help reverent A. respectful B. respect C. reply D. to spoil
what is force ?is it desirable or undesirable?
Hey, need some help reverent A. respectful B. respect C. reply D. to spoil
You would expect a phosphorous-chlorine bond to be 1. nonpolar, with the neither end having a partial charge. 2. polar, with neither end having a partial charge