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

A die is rolled. Write each answer as a fraction, decimal, and percent. Show your work. Solution: a. Find P(3). b. Find P(number < 5). c. Find P(not 1).
Brutus' agreement to _____ worries _____ A.) allow Antony to speak at the funeral, Cassius. B.) lead the republic, Antony. C.) end Cimber's brother's banishment
Who is given credit for uniting the upper kingdom and lower kingdom in egypt?
Why did farmers in the late 1800s want inflation?
Which of these protects the Earth from harmful radiation when found in the stratosphere, but is a pollutant at lower altitudes?
Which of the following types of promotion is usually te least expensive for a company
Because of apoptosis, _________________________. internal factors of the cell that transfer phosphate groups from one molecule to another in order to increase t
The viral infection hepatitis a can be most effectively controlled if ?
How did early humans adapt in order to survive?
What is the name of the family featured in the musical mary poppins?