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

If Walt can paint 25 feet of fence in an hour, and Joe can paint 35 feet in an hour, how many minutes will it take them to paint a 150-foot fence, if they work
How do scientists use seismic waves to determine the interior structure of Earth?
Explain how a species can evolve through natural selection.
By the mid-1700s, the largest city in the colonies was (A) New York (B) Boston (C) Philadelphia (D) Charleston (E) Wilmington, Delaware
Which of the following can be considered fossils? a. a 1 billion year-old rock. b. a 1 billion year-old piece of amber. c. a 1 billion year-old piece of amber w
5x+4y+100 in slope intercept form
What is biogeography and what does it provide?
A farmer hauled in 120 bales of hay. Each of his cows ate 1 1/4 bales. How many cows the farmer feed?
which factor made the most difference in how agriculture affected the economies of the colonies?
Jim’s allowance is $1.20 per week. Stan’s is 25¢ per day. How long will they have to save, if they save both their allowances together, before they can get a m