Practice · 1 of 3
Swap Two Variables
CHALLENGE
Difficulty: beginner+25 XP
a is 1 and b is 2. Swap their values using a third variable, then print them as: a=2 then b=1 (two prints).
Press Submit to check your solution.
Back to lesson: Practice: Variable Drills