Question: Write a Python program to create a variable named num 1 and num 2 . Assign 1 0 to num 1 and 2 0 to

Write a Python program to create a variable named num1 and num2. Assign 10 to num1 and 20 to num2. Write a Python program to swap two integers using a temporary variable named temp. In other words, num1 should hold the value of num2 and num2 should hold the value of num1 now.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!