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

differences between a pyramid and a Cube​
Solve for X. 5(x - 1) = 4(x - 8)
Liza and her husband’s income is greater than the amount eligible for Medicaid. However, they cannot afford private healthcare insurance. Which insurance progra
about how much of the earths surface did the ussr take up?​
two-piece plants with yellow peas are crossed most of their offspring have yellow piece but about 25% of The Offspring have green peas for pea color yellow is t
What is the first step to take to help reduce pollution? A. Donate money to an organization that works to fight water and air pollution. B. Gain information abo
Following world war 1, the allies
Graph the function y = x3 + 6x2 + 2x – 11. Based on the graph, what is the largest possible x-value if y = 0?
help plz......... correct answers only plz
The Philippines are ours forever, “territory belonging to the United States” … And just beyond the Philippines are China’s illimitable markets. We will not retr