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

Plz help me with this
Why did socialism fail to become a major force in american politics between 1900 and 1940 despite widespread dissatisfaction with the social and economic order
what is a factor that determines the rate of sunken ship decay in the ocean? A. currents B. presence of marine animals C. ship material D. all of the above
What is 3/a = 9/8 equal
what is the quotient when x^3 -5x^2 + 3x -8 is divided by x-3 ?
Zoologists are studying two newly discovered species of insects in a previously unexplored section of rain forest. They estimate the current population of insec
Given the net of the rectangular prism, what is its surface area? 96 m2 144 m2 160 m2 180 m2
What was one major outcome of the invasion of Poland in 1939
Although her request was denied, at first Leibovitz wanted to photograph the Queen _____.
need help asap!!!The probability of winning a game is 60%. How many times should you expect to win if you play 20 times?(A)12(B)16(C)8(D)2