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 formula f equals c over lambda, where f = frequency, c = wave speed, and λ = wavelength, is used to calculate frequency. Solve this formula for c. . A. c =
A real-life animal was recorded to make the sound effect of the Ghasts. Which one was it?
QUICKLY PLEASE. The area of one of the small right triangles outlined in blue is A cm2, while the area of the square outlined in red is B cm2. Which expressions
According to the principle of intrinsic fitness (the representation of your genes in your relatives), which of the following strategies best suits a young bird?
Dr. Roberts with the Mayo Clinic conducted a study on individuals between the ages of 70–89 and found differences in men and women. In this example, gender of p
5 inches is what fraction of a foot?​
Which leader was backed by the United States during the Korean War
Fish hatchery workers know that if they want artificially spawned salmon to return to a specific stream to spawn when they reach adulthood, the workers have to
Geography What clouds are associated with a warm front? (mark all that apply) cirrus cumulonimbus altostratus nimbostratus
A series of revolutions in the early 1800s led to independence for nations in A) Africa. B) North America. C) Europe. D) Latin America.