Exercise 5: Students should think about where this code is easily vectorized or parallelized.