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

Anyone know how to say ' I love lemonade a lot. '
Effective writing is best described as writing that
0.9(x+1.4)−2.3+0.1x=1.60.9(x+1.4)−2.3+0.1x=1.6 Enter the answer as a decimal in the box.
Imagine working with a younger sibling or student who is having trouble with the 9 times table. Create an algorithm to help the student learn how to do this eas
What is the law of conservation of mass
describe how to measure the thickness of a paper
In the 2010, New York City Marathon, 42,429 people finished the race and received a medal. Before, the race, the medals had to be ordered. If you were the perso
Hudson’s journeys are considered A. A total failure since he was abandoned and died B. A success since he helped increase knowledge of the new lands C. The end
In “The Song of Hiawatha,” how does Henry Wadsworth Longfellow use setting to create mood?
Jack is filling his new six person hot tub with a water hose. After 58 minutes, his hot tub has 318 gallons water. His hot tub holds 1,360 gallons of water. He