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 scientist dose to which ??
Which two sentences use coordinate adjectives? The dark, musty cellar was full of mice. We rode down a long dirt road on a sunny morning. The dark-haired, hazel
4) The intensity I of a sound (in watts per square meter) varies inversely with the square of the distance d (in meters) from the sound's source. At a distance
Four different triangle congruence postulates are SSS, AAA, SSAA and AASS. True False
Thinking about the areas of a Standard Normal Distribution, as z values decrease, do the areas to the left of z increase, or decrease?
In which direction do loggerhead turtles migrate in the fall?
Simplify The Algebraic Expression x-5/5+10 A. x+11 B. x-3 C. x-9 D. x+3
A 12 foot ladder is leaning against a building . The ladder makes a 45 degree angle with the building . How far up the building does the ladder reach ?
6. Select the sentence in which all pronouns are used correctly. A. I sat between him and her during the sales conference. B. Be sure to divid
Find the measure of angle C.