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

A repetitive image or idea in a text is a
I'm not clothes but I cover your body; The more I'm used, the thinner I grow. What am I?
Explain why the sun’s corona can be seen during an eclipse but not at other times
please help thank you
Solve the following for y: −6x + 2y = 8 A )y = −6x + 8 B) y = 6x + 8 C) y = −3x + 4 D) y = 3x + 4 I'm fairly certain it's C, just need reassurance.
Rainsford remembers the shots. They had come from the right, and doggedly he swim in the direction, swimming with slow, deliberate strokes, conserving his stren
I have a lot to say. I'm not sure what you have already heard at this point. You wish to connect these two sentences into a sentence containing a dependent clau
Calculate the average rate of change for g(x) over the intervals [-2, -1] and [-1, 0].
Help me out plz! Thanks.
Can someone help me with please??​