Exercise 1 (4 pts): Song Reverse In this question, you are given a text file named song.txt which includes the lyrics of
Posted: Fri May 20, 2022 10:25 am
question, you are given a text file named song.txt which includes the lyrics of the song My Life is Going On (Cecilia Krull). ett - 31 1 with the demi 1 ttare at 11 lesine but I'Wing Wate That will Tattare La life - Part A (2 pts): Write a function called longest_word(filename) which reads the given text file and returns the longest word in the song. Part B (2 pts): Write a function called reverse_song(filename) which reads the given text file and reverses the order of the words in each row. Your function should then write the updated text line-by-line to a new file called song2.txt. son 21 1 test care att 101 lasitet T 1 t testail LET song2 Marching you with a 1 11 care late II w I' IF wat all that's stare don't In life I LA
Exercise 1 (4 pts): Song Reverse In this