Problem 1, isPerfect def isPerfect(num): sum = 0 for div in range(1,num): if num % div == 0: sum += div return sum == num alternatively, replace the last line/return statement with if sum == num: return True return False ---- If you use a list comprehension, this will work, but it's not expected that you come up with it, though understanding it is a good idea def isPerfect(num): return sum([div for div in range(1,num) if num % div == 0]) == num --- def combine(phrase): st = "" for w in phrase: st += w[:firstVowelIndex(w)+2] return st --- def isSquareFree(num): for x in range(1,n): sq = x*x if num % sq == 0: return False return True --- def wordCount(words,sub): """ return the number of strings in string list words that contain string sub """ c = 0 for w in words: if sub in w: c = c + 1 return c -- or def wordCount(words,sub): return sum([1 for w in words if w.find(sub) >= 0]) --- def getAgeList(filename, low, high): file = open(filename); ret = [] for entry in file: ls = entry.split(",") animal = ls[0] age = int(ls[2]) if low <= age and age <= high: ret.append(animal) file.close() return ret