Added a check for division by zero
Added some tests for Task 3