I was bored today, so I started to write some few-minutes codes to pass the time. Anyway I wanted to see what is the functional relationship between x to the power of x and x itself, so I wrote the following codes.
x = np.arange(1,21,1)
y = []
for i in x:
y.append(len(str(i**i)))
plt.plot(x,y,'b')
That seems quite simple and absolutely impossible to go wrong, right? There is no error indeed, but the output image is like this.
That is so strange, so I wrote the following codes to verify, print(len(str(20**20))) but this was normal and gave me the result of 27.
It stands to reason that the curve of this function should soar all the way, but it has serious problems at 16 and 20. Is this a Python problem? Why did this happen?
