GeneticCipher / Genetic Cipher / tests.py
tests.py
Raw
import random

def main():
   #s = set([])
   #l1 = (1, 2, 3)
   #l2 = (1, 2, 3, 4)
   #l3 = (1, 2, 3)
   #s.add(l1)
   #s.add(l2)  #tuples work with sets
   #s.add(l3)
   #print(s)   #output (1, 2, 3) (1, 2, 3, 4)
   
   #test = set([1, 2, 3])
   #for i in test:
   #   print(i)     #can iterate over sets output 1 2 3 
   
#    pop = {}
#    for i in range(0, 10):
#       pop[i] = random.randint(0, 10)
#    
#    total = 0.0
#    totals = []
#    for key in pop.keys():
#       total += pop[key]
#       totals.append(total)
#    print(totals)  #total will not be modified after being added to totals
   #print(random.sample(range(0, 25), 6))  #can sample ranges
  
if __name__ == "__main__":
   main()