Question: A string is called a palindrome if it reads the same backward as forward. For example, the strings HANNAH and BOB' are paindromes, but ALICE
A string is called a palindrome if it reads the same backward as forward. For example, the strings "HANNAH" and "BOB' are paindromes, but ALICE is not. For our purposes, capitalisation matters, so we do not regard 'Anna' as a palindrome Write a function is palindrome which takes an input a string text and returns True or False, according to whether text is or is not a palindrome En : def is palindrome(text): # YOUR CODE HERE raise Not implementedError() En 1: assert ispalindrome('HANNAH) assert is_palindromel BOB') En 1: assert not is palindrome 'ALICE') assert not ispalindrome ('Anna') En 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
