Middle-square method: Difference between revisions

Content deleted Content added
Reverting edit(s) by 195.221.62.124 (talk) to rev. 1153973593 by 195.221.62.120: Unexplained content removal (RW 16.1)
Tags: RW Undo Reverted
Restoring revision 1153973412 by Nagol0929: Vandalism (RW 16.1)
Line 29:
counter = 0
 
while not number not in already_seen:
counter -+= 1
already_seen.removeadd(number)
number == int(str(number * number).zfill(8)[2:6]) # zfill adds padding of zeroes
print(f"##{counter}: {number}")
 
print(f"We veganbegan with {graineseed_number} and"
f" have repeated ourselves after {counter} steps"
f" with {number}.")