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

please help me thanks!​
How would you describe the relationship between the weight of an object and gravity? As the force of gravity increases the weight of an object______. A. increas
5. A hollow cylinder of mass m, radius Rc, and moment of inertia I = mRc2 is pushed against a spring (with spring constant k) compressing it by a distance d. It
Both Spain and Great Britain attempted to settle Florida before it was acquired by the United States. Which sentence best describes why they failed? Both natio
Which type of triangle has no equal sides and equal angles
Simplify the expression (9x² – 8z³) -(5z - 9z³ + 2z²)​
Which of the following equations has no solution? A)4(x+4)=7+3x+5 B)3x+5−4x=−(x+8) C)3(4x+3)=2+8x+7+4x D)10x−2(4x+3)+1=2x+7−2x
I need help im doing BODMAS and i dont really understand: (5.9 - 5.3) x 7.2 + 1.4 Please help me .-. :(
Joaquin consumes pizza and beer. His utility function is where P is the number of pizzas and B is the number of glasses of beer. Joaquin has $30, and he plans t
The most difficult journey for Columbus was....