Write a Python program to swap the value of variables.
IDE: Visual Studio Code ( VSC ). Present: go2collage.
Download hole Program / Project code, by clicking following link:
Programming Code:
# Basic Python Program
# Value swap using Single variable
a = int(input("Enter a value: "))
b = int(input("Enter b value: "))
print("Before swaping a= ",a," b= ", b)
# Swaping
c = a
a = b
b = c
print("After swaping a= ", a , " b= ",b)
Output:
0 Comments