Created
October 30, 2021 05:47
-
-
Save moulik-source/72e44aba4730938fe4d43ba380b782a5 to your computer and use it in GitHub Desktop.
km to miles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Taking kilometers input from the user | |
kilometers = float(input("Enter value in kilometers: ")) | |
# conversion factor | |
conv_fac = 0.621371 | |
# calculate miles | |
miles = kilometers * conv_fac | |
print(f"{kilometers} is equal {miles}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment