Dec-05-2020, 02:48 AM
I am a beginning Python coder and I am trying to write code to convert a FIF dimension (One Sixteen of an Inch Precision) - Feet, Inches, Fraction of Inch to Decimal Inches.
I can convert the Feet to inches with no problem. The Fraction is giving me problems.
The fraction of an inch numerator must be limited to a integer (Whole Number) between 0 and 15. I am not sure how to limit my selection to these sixteen numbers. Can you point me in the right direction.
The fraction of an inch denominator must be a integer (Whole Number) one of four numbers 16,8,4, or 2.
The third criteria I have is the denominator must be greater than the numerator.
Do you know if any code exists that my help me out with this task.
This is only by second try at trying to write Python code.
Any help you can provide would be greatly appreciated.
I can convert the Feet to inches with no problem. The Fraction is giving me problems.
The fraction of an inch numerator must be limited to a integer (Whole Number) between 0 and 15. I am not sure how to limit my selection to these sixteen numbers. Can you point me in the right direction.
The fraction of an inch denominator must be a integer (Whole Number) one of four numbers 16,8,4, or 2.
The third criteria I have is the denominator must be greater than the numerator.
Do you know if any code exists that my help me out with this task.
This is only by second try at trying to write Python code.
Any help you can provide would be greatly appreciated.