f=open("arquivo.txt", 'w')
I am making a code to plot a Gaussian on the random walker (Statistical Mechanics) and is giving this error when saving my "count" file. Here's the code:
for j in range (0,t):
count=0
for i in range (0,100):
x[i]=randint(0,1)
if x[i]==1:
count=count+1
f.write=('0.1f\n'%(count))
f.close()
This is the error:
File "estat", line 23, in <module>
f.write=('0.1f\n'%(count))
TypeError: not all arguments converted during string formatting
What can it be?