Skip to content

Instantly share code, notes, and snippets.

@TrevMcKendrick
Created September 25, 2013 17:33
Show Gist options
  • Save TrevMcKendrick/6703124 to your computer and use it in GitHub Desktop.
Save TrevMcKendrick/6703124 to your computer and use it in GitHub Desktop.
#From [rubeque](http://rubeque.com/problems/temperature-robot)
#Temperature bot is comfortable when it's room temperature (18-21C). Help him out by completing the method below:
#Temperature bot is American but takes Celsius temperatures.
def temperature_bot(temp)
if temp >= 18 && temp <= 21
puts "I like this temperature"
else
puts "This is uncomfortable for me"
end
end
temperature_bot(18)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment