Retired

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.

Fundamentals

Similar Kata:

Stats:

CreatedDec 5, 2019
Warriors Trained41
Total Skips0
Total Code Submissions171
Total Times Completed14
Python Completions14
Total Stars1
% of votes with a positive feedback rating58% of 6
Total "Very Satisfied" Votes2
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes1
Total Rank Assessments5
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • marmotteNZ Avatar
Ad