Reference no: EM132211144
Write a program in PYTHON to convert a U.S. Customary System length in miles, yards, feet, and inches to Metric system length in kilometers, meters, and centimeters.
After the numbers of miles, yards, feet, and inches 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 number of meters into a whole number of kilometers and meters.
The number of centimeters should be displayed to one decimal place.
The needed formulas are as follows:
total inches = 63, 360 * miles + 36 * yards + 12 * feet + inches
total meters = total inches/39.37
kilometers = int(meters/1000)