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

Use elimination to solve each system of equations. 1/3x-y=-1 and 1/5x-2/5y=-1
The city of Alexandria in Ancient Egypt was known for having the world's largest
PLEASE HELP ASAP! you WILL get BRAINLIEST! Ameena's boat travels 35 miles per hour. The best fishing spot in the lake is 27 miles away from her starting point.
which text grants powers to congress that are specifically mentioned in article I of the U.S constitution?
Is y/7 = 2/x direct variation?
what were the seven different colors from newtons experiment
The function g(x)= x^2+3. The function f(x) = g(x+2).
Hillary has $75,000.00 to invest in a CD (Certificate of Deposit). The CD earns 4 1/2 %. How long will she have to wait until she has $95,250.00? Round to the n
At the beginning of the week, a stock was $82.73 per share. On Monday, the stock gained $0.19 per share. On Tuesday, it gained $0.07 per share. On Wednesday, th
What is the meaning of consul