Created
June 10, 2013 22:40
-
-
Save chhhris/5753065 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Temperature bot is comfortable when it's room temperature (18-21C). Help him out by completing the method below: | |
def temperature_bot(temp) | |
case temp | |
when 18..21 | |
"I like this temperature" | |
else | |
"This is uncomfortable for me" | |
end | |
end | |
# temperature_bot(18) | |
#=> "I like this temperature" | |
# temperature_bot(21) | |
#=> "I like this temperature" | |
#temperature_bot(22) | |
#=> "This is uncomfortable for me" | |
#temperature_bot(-3) | |
#=> "This is uncomfortable for me" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment