Skip to content

eswarannm/methods-quiz

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Methods Quiz

Setup

Fork the repository, then clone your fork

Quiz

Follow this process for your quiz:

  1. Write the tests for a method first!
  2. Commit with message "Tests for method_name"
  3. Use the tests to write the method.
  4. Commit with message "Implement method_name"
  5. Move on to the next method
  6. When all done, run the entire test suite to verify everything still works
  7. Turn it in with: $ git push

Methods to Implement

  1. has_teen?

    A number is a teen if it is in the range 13 to 19 inclusive. Given three integers, return true if any of them are a teen.

  2. not_string

    Given a string, return a new string where "not" has been added to the front. However, if the string already begins with "not" return the original string unchanged.

  3. icy_hot?

    It is icy if a temperature is less than zero, and it is hot if a temperature is greater than 100. Given two temperatures, return true if either one is icy and the other is hot.

  4. closer_to

    Given a target number and two guesses, return the guess that is closer to the target. If they are the same distance, return 0.

  5. two_as_one?

    Given three integers, return true if it is possible to add two of the ints to get the third.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 100.0%