1. The problem here is that ph < 7.0 is always true whenever ph < 4.0, so the program will never get to this if statement. There are many ways of fixing this but two possibilities are: if ph < 3.0: print "%s is VERY acidic! Be careful." % (ph) elif ph < 7.0: print "%s is acidic." % (ph) Another, slightly more verbose option (and not as nice) is: if 3.0 <= ph < 7.0: print "%s is acidic." % (ph) elsif ph < 3.0: print "%s is VERY acidic! Be careful." % (ph) 2. def firstprimes(num): """Prints out all the primes less than num""" current = 1 # the current number we're checking while current <= num: if isprime(current): print current current += 1 (Could also have done with a for loop)