Challenge: Reverse Words in a Sentence
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 3. Capitolo 4
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Awesome!
Completion rate improved to 5.56
Challenge: Reverse Words in a Sentence
Scorri per mostrare il menu
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 3. Capitolo 4
single