Advertisement
ShaunakVids

6.8 Program to swap numbers

Sep 24th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. #Program to swap 2 numbers
  2.  
  3. num1 = int(input("Enter your first number: "))
  4. num2 = int(input("Enter your second number: "))
  5.  
  6. num1,num2 = num2,num1
  7.  
  8. print("\n When Swapped")
  9. print("The first number is now: ",num1)
  10. print("The second number is now: ",num2)
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement