Adding solutions for homework2_4, homework2_5 and homework2_6