How to use Python to handle scientific notation and perform calculations? e.g:
a='1e+03'
b='1e+02'
How to sum a and b and get result of 1.1+03
How to use Python to handle scientific notation and perform calculations? e.g:
a='1e+03'
b='1e+02'
How to sum a and b and get result of 1.1+03
Is usage of float necessary ? I just used as it is and it printed out 1100.0
a = 1e+03
b = 1e+02
print(a+b)
This post might be helpful if you want the result exactly as 1.1+03 . Display a decimal in scientific notation