Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python basic programs kilometers to miles

# 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('%0.2f kilometers is equal to %0.2f miles' %(kilometers,miles))
Comment

PREVIOUS NEXT
Code Example
Python :: sklearn grid search cross validation show progress 
Python :: get single batch from torch data loader 
Python :: find occerences in list python 
Python :: find an element using id in requests-html library in python 
Python :: python wrapper function 
Python :: django form label in template 
Python :: phone numbers python 
Python :: find median pandas 
Python :: get all functions from a module as string list python 
Python :: python submatrix 
Python :: python detect script exit 
Python :: python email subject decode 
Python :: python list comprehension nested loop 
Python :: how to combine two lists in one python 
Python :: python - remove exta space in column 
Python :: set page title name and favicon in streamlit 
Python :: python parse /etc/resolv.conf 
Python :: Adding Route In Django 
Python :: add text in figure coordinatesp ython 
Python :: Getting the string and the regex of the matched object 
Python :: python boucle for 
Python :: scipy.optimize.curve_fit 3D 
Python :: how to use import command in python 
Python :: merge two list of dictionaries python with string 
Python :: change period to timestamp python 
Python :: how to display python output on html page django 
Python :: python 3 documentation 
Python :: python how to locate and fill a specific column null values 
Python :: lru cache 
Python :: destructuring in for loops python 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =