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

What is the empirical formula for a compound with the molecular formula C6H12Cl2O2? (1) CHClO (3) C3H6ClO (2) CH2ClO (4) C6H12Cl2O2
The ____________ is called the breadbasket of Italy
The saying "Whoso is a man must be a nonconformist" is based on whose transcendentalist belief? Ralph Waldo Emerson Amos Bronson Alcott Henry David Thoreau Marg
6 At STP, which element is a good conductor of electricity?(1) chlorine (3) silver (2) iodine (4) sulfur
Which pronoun best completes the sentence? How is the pronoun used? Oscar practiced with Stewart and __________. A. me; direct object B. I; object of a preposit
Ecrivez les phrases suivantes au passé compose Question: le lion rugit ferocement
which will hit the ground faster a ball thrown parallel to the ground or a ball drop from the same height as the ball
Which of the following inventions helped farmers plant crops more quickly and efficiently? A. Water frame B. Flying shuttle C. Seed drill D. Spinning jenny
1. Simplify: a^7/a^4 A. 1/a^3 B. a^3 C. -a/a^2 D.a^4/a^3 2. Simplify: r^2s^4t/r^2st^3 A. s^3/t^2 B. s^3/t C. s^2t^3 D. s/t 3. Simplify: 3x^6/18x A. 1/6 B. x^4/6
75 students decreased by 80%