My code for task 01 and 02.