import matplotlib.pyplot as plt
xaxis=[]
yaxis=[]
x=int(input('number of triangles:'))
while x>0:
for i in range(0,0x3ff):
yaxis.append(i)
for i in range(0x3ff, 0,-1):yaxis.append(i)
x=x-1
for j in range(len(yaxis)):xaxis.append(j)
plt.plot(xaxis,yaxis)
plt.ylabel('amplitude')
plt.show()
上面的代码引发以下错误:
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/temp_iiec_codefile.py", line 4, in <module>
x=int(input('number of triangles:'))
EOFError: EOF when reading a line