<prompt> Write a function that checks if a string is a palindrome.  <response>: Here is a simple function in Python that checks if a string is a palindrome: pythondef is_palindromestring: reversed_string string::-1 if string reversed_string: return True else: return False Testing the functionprintis_palindromemadam Trueprintis_palindromeracecar Trueprintis_palindromeword False 