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

p(x) is a polynomial with integer coefficients and p(-3) = 0. Which statements must be true? Choose all that apply. x - 3 is a factor of the polynomial. -3 is t
Which of the following reactions would be predicted by the activity series list A. A metal ion reacts with another ion to form a precipitate. B. A metal replace
A spherical shell whose inner radius is 2 cm and whose outer radius is 8 cm is made of material of varying density. At a point {x, y, z}, the density of the mat
What is the area of the cylinders base
Attachment Mathswatch!!
A diver running dives out horizontally from the edge of a vertical cliff and 3.0 s later reaches the water below. How high was the cliff and how far from its ba
The following questions are based on this problem and accompanying Excel windows. Jack's distillery blends scotches for local bars and saloons. One of his custo
In all organisms, DNA contains what kind of Information?
Globalization has resulted in the following
please answer asap for brainliest