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 organisms get the energy they need?
An author uses sensory images and symbols to __________. evoke emotion and create meaning expose basic beliefs of the author distract attention away from the co
Horatio wants to ship a batch of 8 machine parts. The packaging for each part weighs 2 pounds. If each part weighs x pounds, which expression represents the tot
The balanced chemical equation for the reaction between PCl5 and water is given below. If 3.45 moles of HCl are produced, how many moles of water reacted? PCl5
Which founding father worked to establish a separation between church and government by drafting the Virginia Bill of Establishing Religious Freedom? a.Patrick
CAN U GUYS HELP ME WITH THIS PROBLEM?
name one type of cell that uses active transport
Mark the statement if it is accurate about the Glorious Revolution. A. Protestant leaders were upset with James II for appointing Catholics to high positions in
5. A real estate company purchased a vast area of lakefront property. The company plans to divide the area into several lots so that customers can purchase a lo
One way in which Toussaint L' Ouveture, Simón Bolívar, and José de San Martín are similiar is thay they all were (1) supporters of mercantile policies (2) lead