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

The SRT partnership agreement specifies that partnership net income be allocated as follows in the following order:
Tracey Sales Co. has predicted the following costs for this year for 500,000 units: Manufacturing Selling and Administrative Variable $ 800,000 $250,000 Fixed 1
Need help What is the domain shown in the graph
Can someone help and explain this to me,if you do it means a lot :)
Which is a social benefit of abstinence - Reduce chance of becoming infertile - Less likely to develop testicular or breast cancer - Reduce dress about getting
A cost that remains fixed over limited ranges of volumes but changes by a lump sum when volume changes occur outside these limited ranges is called a _____ cost
Which equation is correct? x – 17 = 4 x – 4 = 17 x + 4 = 17 x + 17 = 4
data in the bar graph to solve the following problems. Choose the letter of the correl answer.Distance from Churh (meters)25021019020017515015010050C. 25m1. How
Assume that the current price of a stock is $100. A call option on that stock with an exercise price of $97 costs $7. A call option on the stock with the same e
please help help help help meeeeeeeeeeeeeeeee