213 xr = np.array(x)
214 xs = xr.astype(float)
215 yr =np.array(ys)
216 y = yr.astype(float) 217 ys = np.reshape(y , (100, 1))
218 plt.plot(xs ,ys, 'r')
219
110 with open('Log.txt', 'a') as f:
111 f.write('(' + str(number1) + ')' + '!' + ' '+ '=' + str(answer)+ '\n')
112elif operator1 == 'sin':
113 answer = cmath.sin(number1) 114 answerln = answer * (180/pi) #converts radians to degrees
115 print(answerln) #prints answer in degrees
116 with open('Log.txt', 'a') as f:
147 answerln = answer
148 print(answerln)
149 with open('Log.txt', 'a') as f:
150 f.write(str(operator1) + '(' + str(number1) + ')' '=' + str(answerln)+ '\n') 151f.close()
152
153
There should be no whitespace after the final character in a line.