Week7 finished mathematica exercises