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

Which one describes how much matter an object contains,using SI units?A.43kgB.65mC.38poundsD.89second
What is the displacement after 6 seconds when a car is moving at 12m/s and coasts up a hill with a uniform aacceleration of -1.6 m/s^2
An athlete runs 90 laps in 6 hours. This is the same as how many laps per minute? (A) 1/15 (B) 1/9 (C) 1/4 (D) 1/2 (E) 1
what decimal is equivalent to 122/11?
The equation is:Point K is between points J and L. If JK= x^2-4x, KL= 3x-2 and JL=28, find the lengths of JK and KLbasically x^2-x-2 and how to solve that
Which of the following is a sign of inflammation? a. bruising b. swelling c. numbness d. temperature decrease
write -0.14 as a fraction or mixed number in simplest form
write 700/200 as a terminating decimal. then describe two methods for converting a mixed number to a decimal
The combination of units written kg·m/s2 can be used for which of the following? A. acceleration B. mass C. force D. weight
Who has pennfostsr answers?