A1.2 a and b finished. Added appendix with code.