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

What Idea Is The Policy Of Assimilation Based On?
What does offspring mean in science INTERACTIONS AND ECOSYSTEMS?
Three vertices of a rectangle are given. Find the coordinates of the fourth vertex. (–3, –3), (7, –3), (7, 2) A. (2, –3) B. (3, 2) C. (3, –2) D. (–3, 2)
60/100 in simplest form
What would be a good revision of this stringy sentence? Darwin went to the prom but he forgot the flowers so he went back home to get them. A) Darwin went to th
a piece of fabric for a quilt design is in the shape of a parallelogram. the bas is 5 inches and the height is 3.5 inches. what is the total area of the 25 para
divide 25kg in the ratio 2:3:5
a box contains 100 pens.In each box there are 38 black pens and 42 blue pens,while the rest are green pens.Mr.Cane buys 6 boxes of pens.How many green pens does
Which answer shows a correct way to divide the word at the end of a line? A. fen-ce B. f-ence C. cannot be divided D. fe-nce
how does Australia have a connection to Britain