Skip to content

Instantly share code, notes, and snippets.

@mmandyck88
mmandyck88 / sortsnumbers
Created May 17, 2026 20:56
Sorts numbers into a list from 1 to 100
print ("Melissa Mandyck")
for a in range(1,101): #iterates loop from 1 to 100
b = set() #taking b as set() an empty one
for i in range (1,101): #for each i from 1 to 100
c = a**i%101 #assigning a^x%101 to c
b.add(c) #adding element into set
if(len(b)==100): #if length equals then enters into if and displays a
print(a)