{"id":6814,"date":"2021-09-30T11:30:43","date_gmt":"2021-09-30T06:00:43","guid":{"rendered":"https:\/\/python-programs.com\/?p=6814"},"modified":"2021-11-22T18:35:28","modified_gmt":"2021-11-22T13:05:28","slug":"python-program-to-convert-kilometers-to-miles-and-vice-versa","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-convert-kilometers-to-miles-and-vice-versa\/","title":{"rendered":"Python program to Convert Kilometers to Miles and Vice Versa"},"content":{"rendered":"

Let us begin with the fundamentals, namely understanding the significance of these measuring units. The units of length are the kilometer\u00a0and the mile.<\/p>\n

Examples:<\/strong><\/p>\n

1)km to miles<\/strong><\/p>\n

Input:<\/strong><\/p>\n

distance =6.5 km<\/pre>\n

Output:<\/strong><\/p>\n

The given distance 6.5 km in miles= 4.038905 miles<\/pre>\n

2)miles to km\u00a0<\/strong><\/p>\n

Input:<\/strong><\/p>\n

distance =6.5 miles<\/pre>\n

Output:<\/strong><\/p>\n

The given distance 6.5 miles in km= 10.460756071261889 km<\/pre>\n

Conversion of Kilometers to Miles and Vice Versa<\/h2>\n