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

You feel every citizen has the right to own a gun. If you argue for that right based on the Constitution, you're most likely to refer to A. Amendment VI. B. Am
A global food crisis occurred in 2008 partly as a result of a rice shortage. A shortage in what other crop was causing concern as of 2012?
Which is NOT a factor that affects teenagers' ability to resist peer pressure and stand up for their own values? how high or low their self-esteem is the nature
does an orangutan use its large tail to shade itself from the sun
Which therapeutic cloning application is most likely a benefit to society
Evaluate if x=13.2 and y=4.3 -x-2y
The Murray _____ is in eastern Australia.
Find the simplified form of the expression. Give your answer in scientific notation. (9 x 10^ 5)(6 x 10^ -7)
The primary criticism sociologists have of Piaget's cognitive theory of development is Piaget’s assumption that socialization is complete by age 17. the limita
which type of plant reproductive cell - spore or gamete - is better adapted for dispersing, or spreading, bryophytes and ferns to other places?