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

Roosevelt and Congress helped restore faith in banks by (A) creating the FDIC (B) giving every family $5000 (C) closing unstable banks (D) vetoing a banking act
how did the city of Curitiba address the problem of rapid population growth
What can homeless people see,hear,feel,smell,taste
Why does honey come in so many flavors? Bees make honey from many kinds of flowers. Commercial honey makers add flavors during processing. Each kind of honeybee
What are the three particles of an atom?
Counterculture behavior would least likely include (A) experimental drugs (B) college attendance (C) volunteerism (D) material wealth
A transfer of heat within a liquid or gas that involves warm particles moving in currents is a convection. b connection. c correction. d conduction.
14 line sonnet poem 10 syllables per line about something I hate witch is math.
can someone please help me...f=kry, solve for y
All the following were important abolitionists EXCEPT (A) David Walker (B) Frederick Douglass (C) William Lloyd Garrison (D) Sarah Bagley