๐Ÿ PyQuest๐Ÿ•น๏ธ Challenge Arcade ยท ๐Ÿ•ต๏ธ Palindrome Detective
โญ 0 XP๐Ÿ Python is waking upโ€ฆ

Palindrome Detective ๐Ÿ•ต๏ธ

A palindrome is a word that reads the same forwards and backwards: racecar, kayak, level, wow. ๐Ÿ”„

Your job: build a function that can spot one.

def shout(word):
    return word.upper() + "!"

print(shout("hello"))     # โžœ HELLO!

return hands the answer back to whoever called the function. That's different from print(), which just splats it on the screen โ€” a returned value can be used in an if, stored in a variable, or tested by me. ๐Ÿงช

A comparison like word == word[::-1] is already True or False, so you can hand that straight back:

def is_long(word):
    return len(word) > 5

Your mission

Write a function called is_palindrome that takes a word and returns True if it reads the same backwards, False if it doesn't.

I'll test it with racecar, kayak, banana and more. return โ€” don't print! ๐ŸŽฏ

Your code

Press โ–ถ Run to see what your code does!