As far as asking the user for input use either raw_input or input depending on your version of Python. Then the conversion is simple math. Just google "1 kilometer to miles" and it will give you the conversion rate.
Not much help to give you without solving it.
Look a little on this.
>>> km = raw_input('How many km? ')
How many km? 100
>>> #As you see km is now a string
>>> #make intreger
>>> #100 * ??? what mystery number give miles?
For python 2.x use always raw_input(and convert to what you need)
Python 3.x has only input same as raw_input(it return a string too)
Whenever I start a script I usually write out in plain English what I want to do. It will keep you organized and you will never not know "where to start." Comment out the plain english, and script around it.
For example, here is the "skeleton" for a script to get the statistics of every major league baseball player:
Now, this script would obviously be tediously complicated and long, boring, etc... But, I know know where to start. I first need to query the MLB database. I may want to do a sub-skeleton here, because qerying a database has several different steps, so I might have to do some googling on querying a database using python. But, I know what I'm doing, and I've split my code into 3 parts. Yay me.
So let's see a skeleton for your script, and then we'll give you some tips. :)
Here are some more example skeletons:
Process a restaurant bill
#get all the items ordered
#get the total price
#add gratuity if there are more than 6 people
#print the bill
rename all files in a directory
#get a list of all the files in the directory
#loop through the files, renaming them
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...