numpy.exp(-a*t)*numpy.sin(2(numpy.pi*t) # or np.exp(-a*t)*np.sin(2*np.pi*t)
Solution (much used in this course): do two imports
import numpy as np from numpy import exp, sin, pi ... t = np.linspace(0, T, Nt+1) u_e = exp(-a*t)*sin(2*pi*t)