Okay so i have an assignment and I need to convert numbers into SI units.
For example
1212131A into 1.21MA
or
0.334A into 3.34mA
thanks
For example
1212131A into 1.21MA
or
0.334A into 3.34mA
thanks
|
Python
How to convert numbers into SI unit numbers? |
(May 9, 2013 06:15 AM)Echoe Wrote: Okay so i have an assignment and I need to convert numbers into SI units. By any Chance do you go to Grace? -Chain (May 12, 2013 03:12 AM)zapfen Wrote: Just simple calculate it: 1212131A / 100 = 1.21MA Jump. From nearest. Building. Anyone with some common sense?
Using string or list operations detect the last two characters which will be unit of the quantity.
Like this Code import stringrun this code, it will detect unit from the entered figure This is the output Code >>> It does not detect abbreviations for 'micro'(μ),'ohm'(Ω) etc.. you can add them and form a character map After extracting the unit from the entered figure write a program to convert it to a target unit based on SI standards. (May 12, 2013 02:34 PM)Echoe Wrote: Jump. From nearest. Building. Why should we help you when you act like a dick to anyone that answers? (May 14, 2013 12:32 AM)Echoe Wrote: Uh he was clearly being stupid.. ? -_- No he wasn't. That's the correct answer actually.
Hum no it's not. If he wasn't then he must of misunderstood what I was asking, and how can you tell me it's the correct answer to my question when it's me who is asking it?
I'm sorry but don't bother commenting again and don't be an ass and neg rep like a lil bitch. It was a misunderstanding (May 14, 2013 03:32 AM)Echoe Wrote: Hum no it's not. If he wasn't then he must of misunderstood what I was asking, and how can you tell me it's the correct answer to my question when it's me who is asking it? You asked how to convert the specified units to the values provided. If you plug your values into his script, you get the answer you were looking for. (May 9, 2013 06:15 AM)Echoe Wrote: Okay so i have an assignment and I need to convert numbers into SI units. By the way A(ampere) is an SI unit , you said that you need to convert numbers to SI. In the example you did just the opposite. Are you asking for a converter... |
|
|
| Possibly Related Threads... | |||
| Thread / Author | Replies | Views | Last Post |
| [Java] by cryptobassboostFeb 7, 2019 05:28 PM | 4 | 219 |
Feb 7, 2019 05:28 PM Last Post: Caliban |
| [Python] by astanoAug 16, 2018 07:50 AM | 0 | 97 |
Aug 16, 2018 07:50 AM Last Post: astano |
| [Java] by SIM-1947090Nov 27, 2017 01:13 AM | 4 | 153 |
Nov 27, 2017 01:13 AM Last Post: SIM-1947090 |