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

A major unit of the genetic code is called a(n) _____.
A red blood cell placed in distilled water will swell and burst due
Which best describes Islam? a. It was founded in Rome b. It does not involve prayer c. It uses the Torah d. It was monotheistic
Classify the following items based on the type of polymer they are made from: raincoats and leather shoes. All of these are made from synthetic polymers. Leathe
with the vital assistance of ,theodore roosevelt established the first comprehensive national conservation policy.
explain why bacteria in the soil are necessary in this ecosystem
The cost of a regular price ticket to a saint Louis cardinals baseball game was $60. During the World Series, the price increased by 2/5. What did the fans pay?
Which is part of Buddhist religious teachings? A. an all-powerful God B. the caste system C. the Mahabharata D. the Noble Eightfold Path
In the early 1800s, many people in the United States migrated westwards because
How do the words grieving, sigh, and blight affect the mood of "Spring and Fall"? A. They add a note of sorrow to the poem's hopeful mood. B. They bring a reali