top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Writer's pictureShirajam Munir Fahad

Python Program to Convert Kilometers to Miles

In this blog, we're going to discover ways to convert kilometers to miles and show it.

To apprehend this situation, you have to have knowledge of the subsequent Python programming topics:


  • Python Data Types

  • Python Input, Output, and Import

  • Python Operators

Kilometers to Miles

Output

Here, the user is asked to enter kilometers. This value is stored in the kilometers variable. Since 1 kilometer is equal to 0.621371 miles, we can get the equivalent miles by multiplying kilometers with this factor.


That's all. Happy Learning.

1 comment

Recent Posts

See All

1 comentário


Aina Adekunle
Aina Adekunle
04 de set. de 2021

This code could be greatly improved by considering all common distance conversions; mile, kilometer, meters, foot, Inch etc.

Curtir
bottom of page