Question: Write a function reverse_word(word) that takes a word and returns the word backwards. The function should work with the following code: if __name__ ==
Write a function reverse_word(word) that takes a word and returns the word backwards. The function should work with the following code: if __name__ == '__main__': = backward_word assert backword_word == reverse_word('hello') 'olleh' backward_word = assert backword_word if reverse_word('madam') 'madam' Name your file backwards.py and upload it here. A palindrome is a word, phrase, or sequence that reads the same backward as forward. Write a function is_palindrome that verifies if a word is a palindrome. The function should work with the following code: _name__ == '__main__': assert is_palidrome('madam') True assert is_palidrome('hello') False Name your file palindrome.py ==
Step by Step Solution
There are 3 Steps involved in it
1 def reversewordword return word1 if name main backward... View full answer
Get step-by-step solutions from verified subject matter experts
