Python Program to Swap Two Numbers


Topic: Python Program to Swap Two Numbers

Solution

 
a = float(input(" Please Enter the First Value a: "))
b = float(input(" Please Enter the Second Value b: "))
print("Before Swapping two Number: a = {0} and b = {1}".format(a, b))
temp = a
a = b
b = temp
print("After Swapping two Number: a = {0} and b = {1}".format(a, b))



List all Python Programs