MohdMubasshir
MohdMubasshir MohdMubasshir
  • 24-09-2020
  • Computers and Technology
contestada

15. Write a program in python to read three numbers in three variables and swap first two variables with the sums of
first and second, second and third numbers respectively.​

Respuesta :

tonb
tonb tonb
  • 24-09-2020

Answer:

a = int(input("Enter first number: "))

b = int(input("Enter second number: "))

c = int(input("Enter third number: "))

a,b = a+b,b+c

print(a,b,c)

Explanation:

Assignments like this are easy in python, in the sense that no helper variables are needed!

Answer Link

Otras preguntas

a. Calculate the equivalent resistance of the circuit
(1) Determine the equation of the line passing through the point (0; -1) and parallel to the -axis. Do you remember what the gradient of this line is? (2) Deter
Which function is negative for the interval [-1, 1]? ty 3 2 -3-2-11 -3 ty O Intro 123 x 3 2 1 -3-2-1₁ -3 O x 23 2, -3-2-1 2 of 11 O x 123 321 -3-2-11 -2 MAR -3
In what way are lungs well ventilated?
Sita teaches of us change into passive ​
two particles P and Q are shot vertically up. Particle P is first up with a velocity of 40m/s. After 4 seconds, particle Q is also shot up. Find a)where the two
Instructions: Find the circumference of the circle and round to the nearest tenth. 4 yrds
help me w this pls thanks
write a one page minimum letter to queen victoria from the perspective of okonkwo telling her how you feel about her empire
In cell I5, enter a formula without using a function that divides the General Medicine total in cell H5 by the annual total in cell H9 to display the department