Imperial fractions (retired)
Description:
To the rest of the world, the American Imperial units system is an oddity that can only lead to distaster (https://en.wikipedia.org/wiki/Mars_Climate_Orbiter#Cause_of_failure)
To measure lenghts involves not only a different set of base units (Feet, inches etc) which are not decimaly divided (12s, 16s etc), but also using dyadic rationals (https://en.wikipedia.org/wiki/Dyadic_rational)
Given a lenght in millimeter and an accuracy level n, you must return the lenght in feet and inches, with the fraction of inch displayed dyadically.
1 inch is 25.4mm
The accuracy level means: n = 0 => rounded to the nearest inch n = 1 => rounded to the nearest half-inch . . n = 5 => rounded to the nearest 32th of an inch
Follow the test examples for the formatting required. An empty string must be returned if the rounded result is 0 or less than the accuracy level.
Similar Kata:
Stats:
Created | Dec 5, 2019 |
Warriors Trained | 41 |
Total Skips | 0 |
Total Code Submissions | 171 |
Total Times Completed | 14 |
Python Completions | 14 |
Total Stars | 1 |
% of votes with a positive feedback rating | 58% of 6 |
Total "Very Satisfied" Votes | 2 |
Total "Somewhat Satisfied" Votes | 3 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 5 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |