Solutions to the second homework of lab 2 and 3