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


 

 


About the author

Sarthak Mund S3
◕‿◕कर दिखाओ कुछ ऐसा की दुनिआ करना चाहे आपके जैसा◕‿◕

Post a Comment