6 kyu
Numerical Palindrome #3
283 of 809kkavita92
Description:
A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward as forward. Examples of numerical palindromes are:
2332
110011
54322345
For a given number num
, write a function which returns the number of numerical palindromes within each number. For this kata, single digit numbers will NOT be considered numerical palindromes.
Return "Not valid" if the input is not an integer or is less than 0.
palindrome(5) => 0
palindrome(1221) => 2
palindrome(141221001) => 5
palindrome(1294) => 0
palindrome("1221") => "Not valid"
Other Kata in this Series:
Numerical Palindrome #1Numerical Palindrome #1.5
Numerical Palindrome #2
Numerical Palindrome #3
Numerical Palindrome #3.5
Numerical Palindrome #4
Numerical Palindrome #5
Fundamentals
Similar Kata:
Stats:
Created | Apr 1, 2017 |
Published | Apr 1, 2017 |
Warriors Trained | 1345 |
Total Skips | 59 |
Total Code Submissions | 2883 |
Total Times Completed | 809 |
JavaScript Completions | 283 |
Ruby Completions | 68 |
Python Completions | 415 |
PHP Completions | 69 |
Haskell Completions | 23 |
COBOL Completions | 5 |
Total Stars | 28 |
% of votes with a positive feedback rating | 94% of 232 |
Total "Very Satisfied" Votes | 204 |
Total "Somewhat Satisfied" Votes | 26 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 11 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |