gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
You should read the member rules
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
can anybody help me with this program i would be grateful
Sure, but the answer depends on which version of Python you're using.
You'll be using input() (Python 3.X) or raw_input() (Python 2.X) to prompt the user for input.
You'll also want to make sure you're restricting the user's input to only the "allowed" units. You can use a list for this and the logic will basically be, if desired unit not in list; ignore (or warn user, then print out his options so he knows what he's allowed to use)
The rest is simple multiplication. You can look up conversion rates on Google (type for example "1 mm to inch" and search - results in 1 millimeter = 0.0393700787 inch).
Hope that helps
jlm699
Veteran Poster
1,112 posts since Jul 2008
Reputation Points: 355
Solved Threads: 292