➽ Program:-

p = float(input("Enter the First Number: "))

q = float(input("Enter the Second Number: "))

 

p = p + q

q = p - q

p = p - q

 

print("After swapping, First Number = ",round(p,2))

print("After swapping, Second Number = ",round(q,2))

➽ Output:-

Enter the First Number: 7.8
Enter the Second Number: 12.6
After swapping, First Number =  12.6
After swapping, Second Number =  7.8