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

Which type of ICS facility is used to temporarily position and account for personnel, supplies, and equipment awaiting assignment? A. Incident Command Post B.
Using the word HOMES to remember the Great Lakes is an example of
1 Point How did the spread of recorded music affect perceptions of America abroad?
What is the ananswer to 3x^2+2x-4=​
how many significant digits are in 0.3500
In which scenario is someone using peer pressure based on a reasoning tactic? A. "Ralph, lighten up. If you won't even take a sip, you can't be in our group." B
Which action is a reflex action? A. asking for coffee in a cold climate B. blinking when light is flashed in the eyes C. drinking water when thirsty D. swal
Minimal levels of father care are associated with high levels of a. stereotyping. b. discrimination. c. social scripts. d. aggression.
What allows windows to quickly be resized by clicking the title bar of the window and dragging it to the top, sides, or middle of the screen?
Determine the normality of the following solutions note the species of interest is H 95 g of PO4 3- in 100mL solution