Question: Write a function 'swap () ' that takes two numbers as parameters. This function will swap what's currently stored in the numbers and return the

 Write a function 'swap () ' that takes two numbers as

Write a function 'swap () ' that takes two numbers as parameters. This function will swap what's currently stored in the numbers and return the two numbers back to its caller. You can add new statements to the swap function but you can't delete or rewrite the existing statements below. def swap (num1, num2): # Insert answer here return(num1, num2) def start(): num1 = int(input("First number: ")) num2 = int(input("second number: ")) num1, num2 = swap (num1, num2) # Numbers are swapped now start ()

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 Databases Questions!