Completed homework. Code, pdf and odt write up is included.