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

Which statement is true about the geometric figure that can contain these points? No line can be drawn through any pair of the points. One line can be drawn thr
Pluto’s famous teacher was ___?
Use Theorem 7.4.1. THEOREM 7.4.1 Derivatives of Transforms If F(s) = ℒ{f(t)} and n = 1, 2, 3, . . . , then ℒ{tnf(t)} = (−1)n dn dsn F(s). Evaluate the given Lap
What unintended effect of the Eighteenth Amendment led to its repeal?a.a drop in stock pricesb.an increase in alcohol consumptionc.a rising disregard for the la
If i is raised to the 11th power then it can not simplify to be
SQ bisects TSR. Find the value of x.
According to the fundamental theorem of algebra, which polynomial function has exactly 11 roots
Choose the statement(s) that is/are true about the ratio \frac{C_p}{C_v} C p C v for a gas? (Ii) This ratio is the same for all gases. (ii) This ratio has a val
Question 3 (1 point) Which of the following statements is true? After the Civil War, it was easier for African-Americans and whites to live together. After the
If r(x) = 3x - 1 and s(x) = 2x + 1, which expression is equivalent to (r/s)(6)?