Temperature conversion problem. Please help!
|
08-10-2017, 07:27 AM
(This post was last modified: 08-10-2017 07:31 AM by StephenG1CMZ.)
Post: #2
|
|||
|
|||
RE: Temperature conversion problem. Please help!
If I recall correctly, there are two techniques that can be used to strip out units.
Mathematically, if one divides 3_m by 1_m the result is 3 - a dimensionless number without any units. However, in the case of temperatures I am not certain that would work without first converting to Kelvin, because of the differing 0's. Alternatively, str(x) will yield a string like "3_m" and one can then strip out the underscore and unit from the string, leaving just "3". I have implemented temperature and other unit conversions In my Z_UNITS program. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Temperature conversion problem. Please help! - Skyblues - 08-10-2017, 05:29 AM
RE: Temperature conversion problem. Please help! - StephenG1CMZ - 08-10-2017 07:27 AM
RE: Temperature conversion problem. Please help! - Didier Lachieze - 08-10-2017, 07:35 AM
RE: Temperature conversion problem. Please help! - Skyblues - 08-12-2017, 01:10 AM
|
User(s) browsing this thread: 1 Guest(s)