Your question is Swap Variables Using Extra Space. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Honeywell Experion configuration tools may need to exchange two numeric calibration values before applying an update. Write a function that swaps two values using an explicit temporary variable.
The function must preserve both original values during the assignment sequence and return the swapped values in a two-element list.
Implement swap_values(a, b).
a and b.[b, a], containing the second input first and the first input second.temp, to hold one value while the assignments occur.def swap_values(a, b):