Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercise: Raise Exception

  • Write a function that expects a positive integer as its single parameter.
  • Raise exception if the parameter is not a number.
  • Raise a different exception if the parameter is not positive.
  • Raise a different exception if the parameter is not whole number.