The Upside Down Function Name: reverseLanguage() Parameters: sentence (str) Returns: reversedSentence (str) Description:
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
The Upside Down Function Name: reverseLanguage() Parameters: sentence (str) Returns: reversedSentence (str) Description:
The Upside Down Function Name: reverseLanguage() Parameters: sentence (str) Returns: reversedSentence (str) Description: You find youself teleported to an alternate dimension where people write and read re- verse English. They reverse the order of each word within each sentence that they write. It's tire- some to do it in your head all the time so write a function that takes in a sentence as a string and returns a string that contains each word in reverse order. Hint: The .split() method will be useful here. >>> reverse Language ("I put in the milk before the cereal") 'I tup ni eht klim erofeb eht laerec' >>> reverse Language("I like pineapple on pizza") 'I ekil elppaenip no azzip'