Question: Problem 1. Write a function (5 points) Write a function reverse_word(word) that takes a word and returns the word backwards. The function should work with

 Problem 1. Write a function (5 points) Write a function reverse_word(word)

Problem 1. Write a function (5 points) Write a function reverse_word(word) that takes a word and returns the word backwards. The function should work with the following code: \[ \begin{array}{l} \text { if __-name__=_ '_-main_' : } \\ \text { backward_word = reverse_word('hello') } \\ \text { assert backward_word == 'olleh' } \\ \text { backward_word = reverse_word ('madam') } \\ \text { assert backward_word == 'madam' } \end{array} \] Name your file backwards.py and upload it here. Problem 2. Write a function (5 points) 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: \[ \begin{array}{l} \text { if __name__== '_-main_' } \\ \text { assert is_palindrome ('madam' })==\text { True } \\ \text { assert is_palindrome ('hello' } \left.{ }^{\prime} ight)==\text { False } \\ \end{array} \] Name your file palindrome.py and upload it here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!