Week 4 lecture  exercises