licode › Practice › Swap Places
Swap Places (Variables & Output) Read two words a b and print them swapped: b a.
Input: Two words separated by a space.
Output: The two words in reverse order.
Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint Keep each word in its own variable. More Variables & Output practice Learn to code through practice and play
Build programming skills one lesson at a time
Practice coding with feedback from real test cases
Turn coding practice into a multiplayer challenge
Coding challenges for focused practice
Build software in guided stages
How to make coding games productive
Looking for a game-based alternative to LeetCode?