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

Sketch the linear function f(x)= 1/4 (3x+2) -4x. Select the TRUE key feature of the graph.
Given the following data, find the diameter that represents the 82nd percentile Diameters of Golf Balls 1.33 1.601.62 1.56 1.49 1.46 1.451.47 1.64 1.49 1.701.51
In a secret society a code was descovered JGNNQ which agent wrote it
Find P(hit was made by Hank Arron|The hit was a Single)
What is the volume of 11.6 g of ethane gas (C2H6) at STP? Round to 3 significant figures.
Select the correct answer. Which word is misspelled? A. Joys B. Diaries C. Berrys D. Fares
1. What was The Star Beast about
If two vehicles arrive at an intersection at the same time the car on the left goes first true or false
how can I start a passege​
A rectangle has a base of 21 in and a perimeter of 66 in. What is the height and the area?