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

Write an equation in point-slope form for the line through the given point with the given slope. (9,-1); m=4/3. I need help!
Who was the oldest signatory of the Declaration of Independence?
This song, written and recorded by Woody Guthrie, puts to music a walk along our country’s highways, valleys, deserts, and wheat fields. Name the tune. a. “Am
Who was Samuel F.B. Morse?
true or false the american revolution was fought by the american colonies and china??
A plasma membrane and a cell wall 1. Are two names for the same thing 2. Have the same structure and different functions 3. Have different structures and the s
What other countries celebrate the 4th of July?
question number 4 please help
Believing that all football players are academically challenged, that all African Americans are great athletes, and that all women can cook well are examples o
Who was Samuel F.B. Morse?