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

I need help w/ these two problems if you don't mind.
Religious leader Hong Xiuquan convinced peasants to ____ and build a “Heavenly Kingdom” in China. a. overthrow the emperor c. buy land from the British b. pay m
Electrical current is directly proportional to which of the following quantities? potential resistance capacitance power
What is the value of x in the triangle below?
A family wants to purchase a house that costs ​$165 comma 000. They plan to take out a ​$125 comma 000 mortgage on the house and put ​$40 comma 000 as a down pa
Do you think that the mass media have too much influence on american public opinion
I need help on finding the perimeter of the isosceles triangle
According to erikson, as children enter middle childhood they are dealing with the stage of
Charlene is looking at a pair of earrings that cost $10 find the total cost of the errands if there's a 15% discount in the sales tax is 8% does it matter if th
Gas hydrates are used _____.