1
I thought about making an electrostatic formula that would give the result in scientific notation, but I don’t know how to leave it in scientific notation.
Is there a library for that?
n = int(input("Digite o valor de n "))
e = 1.6*10**-19
q = int(input("Digite o valor de Q "))
resultado = n*e
if(q !=0):
resultado = q / e
print(f'{resultado:.0e}')
else:
resultado = n*e
print(f'{resultado:.0e}')
A tip: to get more pythonic, you can take the if parentheses of your code.
– Rafael Barros