XxAaronxX 0 Newbie Poster

A units of measurement converter. Think about all the things that are measured, like distance, area, volume, energy, weight, temperature, pressure and so on. Now think about the many units of measurement the people around the globe use, anything from rods, stones, pounds, inches, pints and liters. A rather long list.

Start simple, let's say just the distances and a few units. Get that to work, then add more. Google the net for conversion factors. How would you handle the information? Maybe a dictionary in Python. Are there any neat shortcuts?

Your program should answer questions like:
"How many inches in a meter?"
"How many milliliters in a pint?"
"How many acres in a square-mile?"
"How many pounds in a metric ton?"
"How many calories in a BTU?"

Hi,
This is the first Python code i have written without the aid of a tutorial, i was wondering if you could look over it and provide me with your feed back on any bad habits i may have and if there was an easier way to write this, Your feedback would be greatly appreciated.

Thanks

import time
print "Welcome to my measurement converter"
print "This converter will convert meters into yards"

Meters = int(raw_input("Enter the number of meters"))
Yards = Meters * 1.094
print Meters, "Meters is equal to", Yards, "yards"

time.sleep(5)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.