Lecture
Coding Quiz - Palindrome Check
A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward as forward.
For example, radar, level, rotor are palindromes.
In this coding quiz, you need to write a function that takes a string input from the user and returns True if the string is a palindrome, otherwise returns False.
Code Implementation
def solution(s): # Write your code here return
Constraints
-
The input string contains only alphabetic characters and is case-insensitive.
-
Spaces, special characters, and punctuation are not considered.
Examples
-
Input:
"Level" -
Output:
True
-
Input:
"radar" -
Output:
True
Previous lessonCoding Quiz - Implement Binary SearchNext lessonChecking for Palindrome Strings - Problem Solving
Lessons in this chapter · Python Coding Quiz Practice
- 1. Coding Quiz - Palindrome Check
- 2. Checking for Palindrome Strings - Problem Solving
- 3. Coding Quiz - Find Unique Words
- 4. Finding Unique Words - Problem Solving
- 5. Coding Quiz - Caesar Cipher
- 6. Caesar Cipher - Problem Solving
- 7. Coding Quiz - Find Prime Numbers
- 8. Finding Primes - Problem Solving
- 9. Coding Quiz - Finding Indices for a Target Sum
- 10. Creating Target Value with Two-Sum - Problem Solution
- 11. Coding Quiz - Maximize Stock Trading Profit
- 12. Finding Maximum Profit - Solution Explanation
- 13. Coding Quiz - Detecting Anagrams
- 14. Anagram Checker - Problem Solution
- 15. Coding Quiz - Remove the Smallest Number
- 16. Removing the Smallest Number - Problem Solution
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help