6 kyu
Get angle between hour and minute hands
91 of 157Mishaboo
Description:
Your task is to write a function that accepts string parameter time (Example: "22:17"
) and returns angle between minute and hour hands on round clock at that time.
The angle measured is the smaller of two angles the two hands may form.
If hours or minutes out of their range return or input is "Invalid input"
.
For example:
getAngle("15:15"); // 7.5
getAngle("s5:15"); // "Invalid input"
getAngle("error"); // "Invalid input"
Fundamentals
Mathematics
Puzzles
Similar Kata:
Stats:
Created | Nov 18, 2016 |
Published | Jan 27, 2017 |
Warriors Trained | 436 |
Total Skips | 53 |
Total Code Submissions | 1242 |
Total Times Completed | 157 |
JavaScript Completions | 91 |
PHP Completions | 76 |
Total Stars | 12 |
% of votes with a positive feedback rating | 91% of 53 |
Total "Very Satisfied" Votes | 44 |
Total "Somewhat Satisfied" Votes | 8 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 9 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |