Challenge: Reverse Words in a Sentence
Tarefa
Swipe to start coding
Write a function that reverses the order of words in a given sentence using a loop.
- The function must split the input sentence into words.
- The function must use a loop to reconstruct the sentence with the words in reverse order.
- The function must return the reversed sentence as a single string.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 4
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Awesome!
Completion rate improved to 5.56
Challenge: Reverse Words in a Sentence
Deslize para mostrar o menu
Tarefa
Swipe to start coding
Write a function that reverses the order of words in a given sentence using a loop.
- The function must split the input sentence into words.
- The function must use a loop to reconstruct the sentence with the words in reverse order.
- The function must return the reversed sentence as a single string.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 4
single