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

Where was each of these ancient buildings constructed?
Why do businesses seek an equilibrium price? A. It ensures that competitors cannot offer lower prices. B. It attracts the largest possible number of consumers t
from the book how dare the sun rise A friend of Sandra’s gave her a tattoo. What is the shape of her tattoo?
As a marketing major, Stan is a collegiate member of the American Marketing Association. This association holds a collegiate conference every year, and he did a
expressing empathy means the customer gets exactly what they want all the time. True or False?​
what is 0.000000 783 written in a scientific notation​
Greek architecture a. was constructed according to mathematical ratios found in nature b. was considered ornate and lavish when compared to other classical arch
What are the differences between a small and a large office
Two samples probably will have different means even if they are both the same size and they are both selected from the same population.
Which pronoun correctly completes the elliptical clause? Typically, Jasmine arrives earlier than __________. us we him her