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()
The above code throws the following error:
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
According to this post, it is just impossible to use input and print with matplotlib for the simple reason that there is no terminal attached to the GUI on Pydroid.
What you can do if you really want to run it on mobile is either to look for another python app which works as you want, either to use repl.it (your code perfectly worked for me on this website)