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

What does compris mean in French ???
Can you make this into an algebraic expresion
a long distance telephone company charges a rate of 8 cents per minute or 90 cent mininum charge per call, whichever is greater. Find the cost in cents per minu
What does compris mean in French ???
Cellular respiration involves a series of chemical reactions. Which of the following is a primary way that enzymes affect these reactions? A. They decrease the
what were the main ideas of the reformation?
A wet towel is hanging on a clothesline in the sun. What process does the towel dry by?
Why can't we change the subscripts in balancing chemical equations?
anita tosses 3 coins. what is the probability that all the coins will land tails up?
when the Lenape hunted