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 baseball teams are selling raffle tickets to raise money. Team A sells the tickets for $3 each and has already raised $275. Team B sells the tickets for $2.
they are greeted former staff carefully every day while I go there. is it correct?​
help me summarise this please ​
Name three places Marco Polo traveled
Sinx.cosx.cos2x.cos4x=-16
What is the value of the expression below? -8 + 19 + 8 0 11 19 35
The "club" is a stated symbol representing…
A direct quote from a source in an essay: is considered plagiarism. is not a good choice to use as evidence in a persuasive essay. needs an in-text citation.
Distinguish between pure and applied science.
Economist is best defined as the study of (Principles of Macroeconomics)