Python Program to Swap Two Numbers
To swap two numbers we will use another temporary variable to store the value of first number.
- #Python program to calculate area of a triangle
-
- a= input("Enter first number: ")
- b= input("Enter second number: ")
-
- c=a
- a=b
- b=c
-
- print("Swapping of the numbers are", a, b)
Output
