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

You estimate that there are 45 marbles in a jar. The actual amount is 82 marbles. Find the percent error. Round to the nearest tenth of a percent.
Identify at least three characteristics about e.e.cumings' work.
Bosio Inc.'s perpetual preferred stock sells for $102.50 per share, and it pays an $8.50 annual dividend. If the company were to sell a new preferred issue, it
Why do the United States want to control California
Who won the battle of Gettysburg
Enter a balanced equation for the reaction between aqueous lead(II)(II) nitrate and aqueous sodium chloride to form solid lead(II)(II) chloride and aqueous sodi
What are three ways old regime did not represent the people fairly
A marble was dropped into a graduated cylinder holding a volume of 20 mL. The water level increased to 35 mL. The mass of the marble is 37.8 grams. What is the
Which of the following is not an atom A. Nitrogen B. copper C. Carbon dioxide D. Aluminum
adams closet measures 36 inches by 24 inches by 96 inches. what is the longest distance between corners inside his closet? round to the nearest tenth