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

Solve the given polynomial equation. Use the Rational Zero Theorem and Descarte's Rule of Signs as an aid in obtaining the first root.6x^3-7x^2-6x-1=0What is th
Which of the following best explains why 1-butanol, CH₃CH₂CH₂CH₂OH, has a higher surface tension than its isomer, diethyl ether, CH₃CH₂OCH₂CH₃? (A) the higher d
Optimization- Of all rectangles with a perimeter of 10, which one has the maximum area? (Give dimensions)
The cheetah, which is the fastest land mammal, can accelerate from 0.0 mi/hr to 70.0 mi/hr in 3.0 seconds. What is the acceleration of the cheetah? Give your a
What is 0.00000008 in scientific notation?
What does the root word in contestants mean
A __________ is a wide-mouthed body of water close to shore.A.gulfB.bayC.seaD.lake
what fraction is equivalent to 1/3
Can somebody give me some information on Gilda Baron please? It is really important.
What energy transformations are there in a Ferris Wheel?