I'm new with python. I learn it myself and figure out what happen but now, I'm really stuck. Please help me to figure out my problem.
import matplotlib.pyplot as plt
import math
x = [-0.006,-0.005,-0.004,-0.003,-0.002,-0.001,0,0.001,0.002,0.003,0.004,0.005,0.00]
y = [220*(1 - (0.85*math.exp(-math.pi**2/math.log(2)*(x*0.53*10**-9/759.5*10**-9)**2)))]
plt.plot(x,y)
plt.xlabel('optical path difference')
plt.ylabel('coincidence counts in 3 min')
plt.show()
After run it, it returns an error:
TypeError: can't multiply sequence by non-int of type 'float'
How do I need to change my code such that I can multiply the list x
with a float?