Kodewick
Start learning →
Basic←→0 / 100

Mirror names

#037BasicStrings3 min

Some names read the same backwards, like Anna and Bob. Write reads_same_backwards(name) to return True if it does, otherwise False. Case does not matter; the empty string counts as True.

Examples
reads_same_backwards("Anna")→True
reads_same_backwards("Mia")→False
reads_same_backwards("Bob")→True
main.py
def reads_same_backwards(name):
    # your code here: lower case, then compare with it reversed
    return False
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.