6 kyu
Time-like string format
167 of 1,239vshjxyz
Description:
Build up a method that takes an integer and formats it to a 'time - like' format.
The method must raise an exception if its hour length is less than 3 digits and greater than 4.
Example:
solution(800) # should return '8:00'
solution(1000) # should return '10:00'
solution(1451) # should return '14:51'
solution(3351) # should return '33:51'
solution(10000) # should raise an exception
Strings
Fundamentals
Similar Kata:
Stats:
Created | Jul 12, 2013 |
Published | Jul 16, 2013 |
Warriors Trained | 1791 |
Total Skips | 153 |
Total Code Submissions | 8401 |
Total Times Completed | 1239 |
CoffeeScript Completions | 167 |
JavaScript Completions | 912 |
C# Completions | 170 |
Total Stars | 20 |
% of votes with a positive feedback rating | 85% of 262 |
Total "Very Satisfied" Votes | 191 |
Total "Somewhat Satisfied" Votes | 61 |
Total "Not Satisfied" Votes | 10 |