7 kyu
Get decimal part of the given number
7,564 of 8,706Anvar Turobov
Description:
Write a function that returns only the decimal part of the given number.
You only have to handle valid numbers, not Infinity
, NaN
, or similar. Always return a positive decimal part.
Examples
getDecimal(2.4) === 0.4
getDecimal(-0.2) === 0.2
Fundamentals
Similar Kata:
Stats:
Created | Jan 5, 2017 |
Published | Jan 5, 2017 |
Warriors Trained | 10042 |
Total Skips | 74 |
Total Code Submissions | 22392 |
Total Times Completed | 8706 |
JavaScript Completions | 7564 |
Python Completions | 1192 |
COBOL Completions | 9 |
Total Stars | 37 |
% of votes with a positive feedback rating | 87% of 552 |
Total "Very Satisfied" Votes | 435 |
Total "Somewhat Satisfied" Votes | 90 |
Total "Not Satisfied" Votes | 27 |
Total Rank Assessments | 47 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 1 kyu |
Lowest Assessed Rank | 8 kyu |