Swapping using 3rd variable in PYTHON - 👑 सार्थक मुंड S3 🤴🏻

Swapping using 3rd variable in PYTHON

Write a program (WAP) in PYTHON to read two numbers from keyboard(User Input) and exchanging the value of two variable(Swapping).

print('Enter two number :\n')
a = input()
b = input()

print("Before swapping :\nA = ", a)
print("B = ", b)

temp = a
a = b
b = temp

print("After swapping :\nA = ", a)
print("B = ", b)

Try it Yourself ➠

 

Also Read :-


  1. Programs of C

  2. Programs  of C++

  3. Programs of Java

  4. Programs of Python

  5. Codes with HTML, CSS, JS

  6. More Questions & Answers


 

 


Previous article
Next article

Leave Comments

Post a Comment

Articles Ads

Articles Ads 1

Articles Ads 2

Advertisement Ads