Solutions to day 6 homework.