Question: Please write easy and clean code for me. I just start to study python and no idea what to write. Exercise 6.3. A palindrome is

Please write easy and clean code for me. I just start to study python and no idea what to write.
Exercise 6.3. A palindrome is a word that is spelled the same backward and forward, like "noon and "redivider". Recursively, a word is a palindrome if the first and last letters are the same and the middle is a palindrome The folloving are functions that take a string argument and return the first, last, and middle letters def first (word): return word[0] def last(word): return word-1] def mi ddle(word): return wordl1-1] We'll see how they work in Chapter 8. 1. Type these functions into a file named palindrome.py and test them out. What happens if you call mi ddle with a string with two letters? One letter? What about the empty string, which is written and contains no letters? 2. Write a function called is_palindrome that takes a string argument and returns True if it is a palindrome and False otherwise. Remember that you can use the built-in function len to check the length of a string. Solution: http://thinkpython2. com/ code/palindrome_ soln.py
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
