Write a program to convert a US Customary System length in miles, yards, feet and inches to a Metric System length in kilometers meters, and centimeters. A sample run is seen in grey from the figure. After the numbers of miles, yards, feet and inchers are entered, the length should be converted entirely to inches and then divided by 39.37 to obtain the value in meters. The int function should be used to break the total meters into a whole number of kilometers and meters. The number centimeters should be displayed to one decimal place. The needed formulas are as follows:

Total_inches = 63360*miles + 36*yards + 12*feet + inches
Total_meters = total_inches/39.37
kilometers = int(total_meters/1000)

You will need to write out the rest of the numbers in meters left over after converting to kilometer. For example if the total meters calculated is 6035.358765. Your out should be 6 kilometers, 35 meters and 35.9 centimeters. Make sure to have functions for each calculations and for the user defined inputs. Check to make sure that user inputs are a number and not a character.

Sample output:

Enter number of miles: 5
Enter number of yards: 20
Enter number of feet: 2
Enter number of inches: 4
Metric length:
8 kilometers
65 meters
73.5 centimeters
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.