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

how do i estimate 48.03 + 7.55 by rounding to the nearest whole number?
What are the pros and cons of using the internet in a medical office setting
What best defines a Chancellor? the Russian head of state forming a mutual agreement between two nations Otto von Bismarck of Germany
i am not good with math. Jessica lost some money she found 3/6 of it what fraction of her money is still missing
Who claims the territory of Kashmir? A. India B. Burma C. India and Pakistan D. Great Britain and Iran Of the following, which imports the most oil in barrels
write an addition story problem. Have a classmate solve your problem.
To make sure your reader remembers the point of your essay, which of the following is most important? A. The introduction B. The ending C. The order in which y
In 1941, the Atlantic Charter was signed by _____ and the United States, stating that neither country wanted to acquire territory nor would attempt to govern ot
barb is making a bead necklace. she strings 1 white bead then 3 blue beads then 1 white bead and so on. write the numbers for the first 8 beads that are white
What are extremes in math with an example so I can understand it better?