Starting with assignment 7, num_factors.py