Swap two values 🌶️🌶️
The program below gives first and second their starting values, and its last two lines (locked) print first and then second. Write code in the box so that the two variables trade values: after your code runs, first should hold what second started with, and second should hold what first started with. Your code will be tested with several different starting values.
Try first = second; on paper with first = 3 and second = 8. Once first has been overwritten, its old value is gone — where would you get it back from?
Save one of the two values in a third variable before you overwrite it, then use that saved copy when you assign the other variable.