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

The cost of 2 tv and 3 DVD player is $1421. The cost of 1 dvd is half of the tv. What's the cost of the tv
Maya Angelou shows in the narrative that she was jealous of siblings. made money for her family in cotton fields. longed for a mentor to admire. found out she w
A 100 pound person on earth would weigh about 4*4*4*4pounds on Jupiter. Evaluate the expression to determine how much a 100 pound person would weighing jupiter
Why were more Americans able to buy luxury items such as cars in the 1920's
why is 0.04 is 1/10 of 0.4
Find three pairs of numbers for which the least common multiple equals the product of the two numbers
round 141.999 to the nearest tenth,hundredths,ten,and hundred.
An amoeba eats some food. Which organelles will help store and digest it? vacuoles and lysosomes mitochondria and ribosome endoplasmic reticulum and the Golgi a
Colonists used the phrase “No taxation without representation” to suggest that
ronald states that number 1/11 is not rational because, when converted into a decimal, it does not terminate. nathaniel says it is rational because it is fracti