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
get_decimal(2.4)  # 0.4
get_decimal(-0.2) # 0.2
Fundamentals

Stats:

CreatedJan 5, 2017
PublishedJan 5, 2017
Warriors Trained10042
Total Skips74
Total Code Submissions22392
Total Times Completed8706
JavaScript Completions7564
Python Completions1192
COBOL Completions9
Total Stars37
% of votes with a positive feedback rating87% of 552
Total "Very Satisfied" Votes435
Total "Somewhat Satisfied" Votes90
Total "Not Satisfied" Votes27
Total Rank Assessments47
Average Assessed Rank
7 kyu
Highest Assessed Rank
1 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • Anvar Turobov Avatar
  • bkaes Avatar
  • JohanWiltink Avatar
  • B1ts Avatar
  • albertogcmr Avatar
  • akar-0 Avatar
Ad