← back to unit
Easy
# puzzle gauntlet easy
Flip the Sentence
The spell reverses WORD ORDER, leaving each word intact: 'eat more pie' → 'pie more eat'. 🔄
You get a sentence. Print the words in reverse order.
Example:
Input: sentence = "eat more pie"
Output: pie more eat
Splitting into words gives ["eat", "more", "pie"]; reversing their order (not the letters inside each word) gives ["pie", "more", "eat"].
💡 need a hint?
pg-flip-the-sentence.py🔒 given lines are locked — write your code in between
loading...