Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristhofer Travieso <cristhofert97@gmail.com>2012-08-21 23:04:40 (GMT)
committer Cristhofer Travieso <cristhofert97@gmail.com>2012-08-21 23:04:40 (GMT)
commit0c036d78f7fc127c619e7df5c61f6cb077d1409e (patch)
treef00d46676329aca5eef902408010fca7ca51ee71
parent632d914b11c82444b223a59b4610ab5a90f35beb (diff)
Change values
-rw-r--r--convert.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/convert.py b/convert.py
index 0c5785b..a99b43b 100644
--- a/convert.py
+++ b/convert.py
@@ -37,10 +37,6 @@ lenght = {'Meters[m]': (1, 1), 'Kilometers[km]': (1000, 0.001),
'Yards': (0.914, 1.09409190372)
}
-speed = {'Kilometers/Hour': (1, 1),
- 'Centimeter/Minute': (1666.666667, 0)
- }
-
area = {'Meter2': (1, 1), 'Foot2': (0.092903, 10.763915051182416),
'Yard2': (0.836127, 1.1959905612424908),
'Inch2': (0.00064516, 1550.0031000062002),
@@ -70,10 +66,25 @@ volume = {'Meter3': (1, 1), 'Foot3': (0.0283168, 35.31472482766414),
'Gallon': (0.00378541, 264.172176857989)
}
-temp = {'Kelvin': (1, 1), 'Celsius': (274, -272),
- 'Farenheit': (255.77777777777777, -457.6)
+temp = {'Celsius': (1, 1),
+ 'Kelvin': (274.15, 272.15),
+ 'Farenheit': (33.8, -17.22222222)
}
+speed = {'Kilometers/Hour': (1, 1),
+ 'Centimeter/Minute': (0.000679856115108, 1470.8994709),
+ 'Centimeter/Second': (0.0359712230216, 27.8),
+ 'Foot/Hour': (0.000304676258993, 3282.17237308),
+ 'Feet/Minute': (0.018273381295, 54.7244094488),
+ 'Feet/Second': (1.09712230216, 0.911475409836),
+ 'Iches/Second': (0.0913669064748, 10.9448818898),
+ 'Kilometers/Second': (3597.12230216, 0.000278),
+ 'Knots': (1.84892086331, 0.540856031128),
+ 'Mach': (1194.24460432, 0.00083734939759),
+ 'Meter/Minute': (0.060071942446, 16.6467065868),
+ 'Meter/Second': (3.59712230216, 0.278),
+ }
+
def convert(number, unit, to_unit, dic):
main_unit = number * dic[unit][0]