The tags are

<pre>

here comes the PREedited code

</pre>

Python is great!

]]>Have fun with python! ]]>

[I never edit comments, but the indentation in your code was destroyed in the display, so I corrected it with a pre/pre. I hope you don’t mind].

Thank you very much for your improvement! Actually, to be honest, I had thought of that solution, but I thought falsely that 3 “append” would make the code less clear. Obviously I was wrong! ðŸ˜‰

]]>if I may, I’d like to suggest an improvement to the python code. It removes the my_zeros function and therefore the list is not traversed twice. I hope the code doesn’t get mangled in the comment..

Have a nice day!

for modulo in range(2,13): print "modulo =",modulo max = modulo**2 fibonacci = [] fibonacci.append(0) fibonacci.append(1) j = 2 for j in range(2, max): fibonacci.append( (fibonacci[j-1] + fibonacci[j-2]) % modulo ) if fibonacci[j] == 1: if fibonacci[j-1] == modulo - 1: per = j + 1 break print fibonacci[0:per] print "period =", per print]]>