Find Palindromes
Find Palindromes
Tags: Basics
Credit: CodingChallenge
Difficulty: Beginner
Type: Text
Category: Practice
Time Allowed: 5 s
Description:
Write a function that takes a list of words and identifies which words are palindromes. This problem is designed to help you practice creating and calling custom functions
. The helper function should accept one word and return a boolean value.
Constraints:
- The input will be a list of
string
. - The helper function should
return
aboolean
value:True
orFalse
. - The main method output must be a list of
bool
. - You should use the provided helper function.
Example:
- Input:
["racecar", "hello"]
- Output:
[True, False]
Test Case | Input | Expected Output |
---|---|---|
1 | ["racecar", "hello"] | [True, False] |
2 | ["hello", "madam"] | [False, True] |
3 | ["eve", "radar", "rotator"] | [True, True, True] |
4 | ["wow", "madam", "no"] | [True, True, False] |
Leave a Comment
Please login to leave a comment.