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

Evaluate the expression 5 x (8+6-2)
Jessup Company expects to incur overhead costs of $20,000 per month and direct production costs of $125 per unit. The estimated production activity for the upco
Which statement BEST describes the "Great Migration"? A) It was a mass movement of political refugees from Asia. B) It was a movement of immigrants from easter
45mi/h=ft/s 45 miles per hour.Convert ft per second
A redundant constraint is one that: has a zero coefficient for at least one decision variable. a. is parallel to the objective function. b. does not form a un
Prepare the necessary journal entries to record the following transactions, assuming Eustace Company uses a perpetual inventory system. (a) Eustace sells $45,0
(58) The pressure of a gas in a tank is 422 psi at 20.0K. What is the pressure at 60.0K? a. 1270 psi 7.480 atm c. 1270 atm d. 480 psi
The mode of natural selection in which one extreme phenotype is fittest and the environment selects against the others is: disruptive selection. uniformitaria
Which programming language was released first
You expect Technomess Company common stock to pay a dividend of $2.40 one year from now. You can buy the stock now for $52, and you plan to sell the stock at th