Homework 3 for the MWAD course