def createPrimeNumbersList(self, totalNumbers): listOfPrimes = [] primeNumber = 2 for i in range(0,totalNumbers): while not isPrime(primeNumber): primeNumber += 1 listOfPrimes.insert(i, primeNumber) primeNumber += 1 return listOfPrimes
def getListOfPrimes(high): myList = [] for i in range(2, high): if isPrime(i): myList.append(i) return sumOfAList(myList)