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

How do you divide. Please help I can't remember.
Compare and contrast an electromagnet and a permanent magnet.
All living things are either Eukarya, Bacteria, or Archaea. These three broadest categories in the classification of life are called _______.
You work at a fruit market. Bananas cost 50¢ a pound. A customer hands you a bunch of bananas that weighs 3 pounds. How much should you charge for the bunch o
2*10^30/1.4*10^27 and round it to the nearest tenth
Air Mass is a large body of air that has the same ____________ and ___________ throughout.
The density of ice is 0.92 g/cm3. An ice sculptor orders a one cubic meter block of ice. What is the mass of the block? Hint: 1 m3 = 1,000,000 cm3. Give your an
How would I find the slope intercept form of x+y+3=0?
Which of the following was not one of the four bodily humours? a) choler b) blood c) cholesterol d) black bile e) phlegm
Which substance does not obey the Lewis octet rule? a. O₂ b. NO c. CO d. N₂ Can anyone explain this one for me?