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....

In python. Please explain each line of code by commenting it out. Make sure to have functions for each calculation and for the user defined inputs. MAKE SURE IT MATCHES THE NEEDED FORMULASWrite a program to convert a US Customary System<br>length in miles, yards, feet and inches to a Metric<br>System length in kilometers meters, and centimeters.<br>A sample run is seen in grey from the figure. After<br>the numbers of miles, yards, feet and inchers are<br>entered, the length should be converted entirely to<br>inches and then divided by 39.37 to obtain the value<br>in meters. The int function should be used to break<br>the total meters into a whole number of kilometers<br>and meters. The number centimeters should be<br>displayed to one decimal place. The needed formulas<br>are as follows:<br>Total_inches = 63360*miles + 36*yards + 12*feet +<br>inches<br>Total_meters = total_inches/39.37<br>kilometers = int(total_meters/1000)<br>You will need to write out the rest of the numbers in<br>meters left over after converting to kilometer. For<br>example if the total meters calculated is<br>6035.358765. Your out should be 6 kilometers, 35<br>meters and 35.9 centimeters. Make sure to have<br>functions for each calculations and for the user<br>efined inputs. Check to make sure that user inputs<br>are a number and not a character.<br>Enter number of miles: 5<br>Enter number of yards: 20<br>Enter number of feet: 2<br>Enter number of inches: 4<br>Metric length:<br>8 kilometers<br>65 meters<br>73.5 centimeters<br>

Extracted text: 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 efined inputs. Check to make sure that user inputs are a number and not a character. 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

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here