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

Can someone sum up the whole movie of a wrinkle in time for me thanks it's for school lol I am suppose to read the book but I don't want too​
Ariel pulled out the essay she was supposed to analyze for class thenext day. Then, she found the instruction sheet the teacher had provided. She read the list
When an item is purchased ,money is exchanged for the to.......
Do scientific theories have math in them?
define meropolition city​
For a parking application that lets you pay for parking via your phone, which of these is an example of a functional requirement that would be listed for parkin
At a certain company, loan agents are paid based on the number of loans they close in a day. Based on company records, the number of loans X that a randomly sel
An ice sculpture is melting because of heat. Assuming its height changes by negative 2 over 25 m every hour, what will be the change in the height after 5 hours
A spacecraft on its way to Mars has small rocket engines mounted on its hull; one on its left surface and one on its back surface. At a certain time, both engin
After the Industrial Revolution, how did European imperialism affect Asia?