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

Read Shakespeare's "Sonnet 100." Where art thou Momentan ou forget'st so long To speak of that which gives thee all thy might? Spend'st thou thy tury on some wo
Find the value of each variable in the parallelogram
The table shows your test results for math class. What test score do you need on the last exam to earn 90% of the total points? Test score percent answer needed
True or false? Dispositionism refers to the view that our behavior and actions are determined by our immediate environment and surroundings.
Name the following formulas/symbols. a) NAD b) NADP c) NADPH
SALE 35% OFF! Felix buya handbag during the sale. If the original price was $80, how much does Felix pay?
all of the following are problems for marine organisms Except: turbulence, colder water, less sunlight, weaker currents
The moral principles by which we live and work are known as _____.Select one:a. regulationsb. rulesc. ethics d. laws
What does –3.6 ÷ –1.5 equal
Write a rule to describe each transformation. H(-5,-5) to H’(3,-3).