Python 3 Program to Convert Kilometres to Miles

3
200

python 3 program to convert kilometres to miles

In this programming tutorial, you will learn a simple Python 3 program to convert kilometers to miles. Before moving ahead, make sure that you know about basic Python programming concepts such as variables, data types, and operators. If you love books, then do check out these best books to learn Python programming.

Python 3 Program To Convert Kilometers to Miles

As you know, 1 KM is equal to 0.621371 Miles. Therefore, to convert kilometers to miles, you just have to divide the number entered by a user by 1.609.

Here is the Python source code you can refer:

#Python program to convert Kilometers to Miles
KM = float(input(print("Enter Kilometer = ")))
M = KM/1.60934
print("Miles = ", M)

Output

output - python program to convert kilometers to miles

Download Python File.

Other Python programs for practice

  1. Python 3 Program To Add Two Matrices.
  2. Python 3 Program to Check Armstrong Number.
  3. Python 3 Program to Find the Sum of Natural Numbers.
  4. Python 3 Program To Find The Factorial Of A Number.
  5. Python 3 Program to Find Largest Among Three Numbers.
  6. Python 3 Program to Check Leap Year.
  7. Python 3 Program To Check If Number Is Positive Or Negative.
  8. Python 3 Program To Convert Celsius To Fahrenheit.
  9. Python 3 Program to Generate A Random Number.
  10. Python 3 Program To Swap Two Numbers.
  11. Python 3 Program To Solve A Quadratic Equation.
  12. Python 3 Program to Calculate The Area of a Triangle.
  13. Python 3 Program to Find the Square Root of A Number.
  14. Python 3 Program To Add Two Numbers.
  15. Python 3 Program to Print Hello World.