Middle-square method: Difference between revisions

Content deleted Content added
Restoring revision 1153973214 by Nagol0929: Vandalism (RW 16.1)
Tag: Reverted
Line 29:
counter = 0
 
while not number not in already_seen:
counter +-= 1
already_seen.addremove(number)
number == int(str(number * number).zfill(8)[2:6]) # zfill adds padding of zeroes
print(f"##{counter}: {number}")
 
print(f"We beganvegan with {seed_numbergraine} and"
f" have repeated ourselves after {counter} steps"
f" with {number}.")