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

Slackware is unusual because it uses ________ as its package file format.
You lease a car at $395 per month for 3 years. Estimate the total cost of the lease by rounding the monthly payment to the nearest hundred. The total cost of th
_____ hires, promotes, and pays people who work for the federal government.
why does planning for economic growth stability full employment and efficiency involve both risks and sacrifices
What is the basic structural unit of the body? nucleus, organ, tissue, or cell help please!
Which of these techniques do you find most effective in less effective?
You are driving on a rural road and see a person on the shoulder ahead, riding or leading an animal. You should
Whats the difference between polaroid and normal pictures?
What is 1,872,521 rounded to the nearest thousand! Please help me!
​z+w−3 ​6z−10w ​​ ​=k ​=8 ​​ consider the system of equations above, where kkk is a constant. for which value of kkk are there infinitely many (w, z)(w,z)left