Challenge: Reverse Words in a Sentence
Tarea
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.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 4
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Awesome!
Completion rate improved to 5.56
Challenge: Reverse Words in a Sentence
Desliza para mostrar el menú
Tarea
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.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 4
single