 # Python Program to Convert Kilometers to Meters, Miles

The objective of this Python post, you will see various Python programs that cover the following:

• Python Program to Convert Kilometers to Miles.
• Python Program to Convert Kilometers to Meters.
• Python Program to Convert Kilometers to millimeter.

### Python Program to Convert Kilometers to Miles

```# Python program to convert kilometer to miles

# take input from user
kilometers = float(input("Enter value in kilometers: "))

# conversion factor
conMil = 0.621371

# calculate miles
miles = kilometers * conMil
print('%0.2f kilometers is equal to %0.2f miles' %(kilometers,miles))
```

Output

```Enter value in kilometers:  100
100.00 kilometers is equal to 62.14 miles```

### Python Program to Convert Kilometers to Meters

```# Python program to convert kilometer to miles

# take input from user
kilometers = float(input("Enter value in kilometers: "))

# calculate miles
meter = kilometers * 1000.0

print('%0.2f kilometers is equal to %0.2f meters' %(kilometers,meter))
```

Output

```Enter value in kilometers:  2
2.00 kilometers is equal to 2000.00 meters```

### Python Program to Convert Kilometers to millimeter

```# Python program to convert kilometer to millimeter

# take input from user
kilometers = float(input("Enter value in kilometers: "))

# calculate miles
millimeter = kilometers * 1000000

print('%0.2f kilometers is equal to %0.2f milimeters' %(kilometers,millimeter))
```

Output

```Enter value in kilometers:  2
2.00 kilometers is equal to 2000000.00 milimeters ```

## Recommended Python Programs 