7 kyu
Convert Decimal Degrees to Degrees, Minutes, Seconds
263 of 515danieldauk
Description:
Convert Decimal Degrees to Degrees, Minutes, Seconds.
Remember: 1 degree = 60 minutes; 1 minute = 60 seconds.
Input: Positive number.
Output: Array [degrees, minutes, seconds]. E.g [30, 25, 25]
Trailing zeroes should be omitted in the output. E.g
convert (50)
//correct output -> [50]
//wrong output -> [50, 0, 0]
convert(80.5)
//correct output -> [ 80, 30 ]
//wrong output -> [80, 30, 0]
convert(0.0001388888888888889)
//correct output -> [ 0, 0, 1 ]
//wrong output -> [1]
Round the seconds to the nearest integer.
Fundamentals
Similar Kata:
Stats:
Created | May 4, 2017 |
Published | May 4, 2017 |
Warriors Trained | 1569 |
Total Skips | 32 |
Total Code Submissions | 3459 |
Total Times Completed | 515 |
JavaScript Completions | 263 |
Python Completions | 275 |
Total Stars | 26 |
% of votes with a positive feedback rating | 71% of 111 |
Total "Very Satisfied" Votes | 67 |
Total "Somewhat Satisfied" Votes | 24 |
Total "Not Satisfied" Votes | 20 |
Total Rank Assessments | 22 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |