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 information does the Sergeant/Captain give to King Duncan? How does Macbeth behave in battle?
Why do you think landlords care about an applicants credit score when deciding whose application to accept for a rental apartment?
Complete the steps to identify all potential rational roots of f(x) = 3x2 – x – 4.
How did Hitler’s breaking of the Hitler-Stalin Pact of 1939 change the war in Europe?
Q:Explain how a liquid is changed into a gas during boiling(heating) in terms of kinetic particle theory.Q:Explain how a gas is changed into a liquid during con
Regulating the national military is an enumerated power of Congress. true or false
Many people are scared of the rise of Artificial Intelligence (AI). Do you think computers that are controlled by an AI are something to be afraid of? Why or wh
Find the area of the following Triangle.
(2⁄3)3 the 3 is a exponent a answer would help but i would also like a step by step explanation so i can solve it on my own next time
I need help and pls help