Секція 1. Розділ 16
single
Challenge: Reverse Words in a Sentence
Свайпніть щоб показати меню
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 16
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат