Perform unit conversion.
(res)
| 25 | print(options[command]) |
| 26 | |
| 27 | def perform_conversion(res): |
| 28 | """Perform unit conversion.""" |
| 29 | for i in res[3].split(','): |
| 30 | value = round(eval("{} * {}['{}'] / {}['{}']".format(res[2], res[0], i, res[0], res[1])), 6) # calculating |
| 31 | print("{} \t : {}".format(i, value)) # displaying |
| 32 | |
| 33 | if __name__ == "__main__": |
| 34 | main() |