Implementation of exception handling

Lines 107 - 113 handles if an incorrect number or a non-integer value is
input.