Question: 1. (5 points) (a) John wrote the following python program to swap two variables a and b's values, what's wrong with the program? Please list
1. (5 points) (a) John wrote the following python program to swap two variables a and b's values, what's wrong with the program? Please list all coding issues and logic errors def swap(a, b) C-a a-b bC swap(a, b) 8 print(a, b) (b) Please rewrite the program in at least two different ways to implement the swap correctly
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
