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

A t-shirt costs $16.50 with the total cost, including tax coming to $17.66. what was the tax rate? (% of change)
x= 90, y=47 x=43, y= 47
How did Hoover react to the Great Depression?
Anthony has been known to cheat, steal, lie, and manipulate others to get what he wants. even worse, he feels no remorse after committing such acts. it is most
The Mayas moved from the highlands of Guatemala to: 1. Central America 2. Yucatan Peninsula 3. Mexico City
if the moon waxes from a new moon, what phase would the moon be in next
Which choice could be the equation of a line perpendicular to the line represented by this equation? y = 5 a. y = 4x- 9 b.y=-1/5x c. y = 5x d. x = 5
In 'Tuck Everlasting' How do the Fosters respond to the man in the yellow suit's request? A.They agree with his demands.B.They try to change the man's mind and
Which detail from The Diary of a Young Girl best supports the mood of terror and anxiety? “I don't think I'll ever feel at home in this house, but that doesn't
What are two characteristics that Hawaii and Washington share?