Finished two exercises

Signed-off-by: mrahmiao <mrahmiao@gmail.com>
Finished homework of lecture 3

Signed-off-by: mrahmiao <mrahmiao@gmail.com>