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

how is the telegraph you made like the one morse made?
True or False- The real Plymouth rock is cracked:
How ions are formed for ionic bonds?
In golf, scores are often written in a relationship to par, the average score for a round at a certain course. Write an integer to represent a score that is 7 u
Solve the equation; 2x-1=3
suppose a coin is altered so that the probability of heads coming up is 1/5 what is the probability of tails coming up
a punch recipe that serves 24 people calls for 4 liters of lemon-lime soda, 2 pints of sherbet,and 6 cups of ice. How much of each ingredient would you need to
The screen on Branna's new phone is 2.85 centimeters long what mixed numder represents the length of the phone screen
True or False- Turkeys can drown if they look up in the rain.
During training, Janice kayaked 4.68 miles on Monday and 5.61 miles on Tuesday. How much farther did she kayak on Tuesday?