Middle-square method: Difference between revisions

Content deleted Content added
Restoring revision 1153973093 by ButterCashier: Vandalism (RW 16.1)
No edit summary
Tags: Reverted possible vandalism
Line 30:
 
while number not in already_seen:
counter +-= 1
already_seen.add(number)
number = int(str(number * number).zfill(8)[2:6]) # zfill adds padding of zeroes