Added solution for Ex-04 1,2 subtasks