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

Danika and Karen bought a pizza that was cut into 8 slices. If Danika ate 3/4 of the pizza, how many slices were left for Karen?
What conditions cause light to bend?
Solve for x. Type a numerical answer in the space provided. Do not use spaces in your answer. For example, if the answer is x = 15, type 15. 15x + 6 = 10x + 21
What to the power of 3 equals 729
0.02 is 10 time as much as
What is the mode? I can only pick one answer, but there are 3 answers that have a number that occurs the most. PLEASE explain how you got your answer. Look at t
How to do question 13
What is 12.08 written as a mixed number
1) what is the volume of a cylinder with a radius of 2 cm and a height of 10 cm? ( Express your answer using symbol pie) A) 4(symbol pie) cm^3 B) 10(symbol pie)
describe the benefits to using tissue cultures to study medications used for treating cancer cells