Quiz 2

Methods and Conditionals

Tasks

  1. Create a method called square which takes a parameter x and squares it

  2. Create a method called to_bool, which takes a string parameter called questionable_string and if the text of the string is 'true' then return the boolean value true, otherwise return false.

  3. Create a method called is_prime, which calculates if an input parameter x is prime, and return true or false. Just brute force this and don't try to be too smart about it.