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

The diagram below shows the location of three stars in space. The light from Star 2 reaches Star 1 in 63 years. If Star 3 is 75 light years from Star 2, which o
I need this like right now. so please help me.
Which one of the following events is an example of situational irony? A. Bernice overhears Marjorie talking with her mother. B. Bernice cuts her hair and sudd
the product of x and 5 plus 2
Monitoring environmental parameters can help policy makers determine _______.
Prospective small business owners can best attract investors by A. creating a thorough business plan. B. mounting an expensive advertising campaign. C. select
During the debate over the ratification of the Constitution, Antifederalists argued that
What is equivalent fraction of 4/5
why is the Hebrew insistence on monotheism an important turning point in the history of Mediterranean religions?
Young people in wealthy countries take what they have for granted: they should care more about young people suffering in poor parts of the world, and do more to