Created
April 27, 2016 02:00
-
-
Save charmainetham/0efbbb468ce0a381857a2b93125ed3c4 to your computer and use it in GitHub Desktop.
SHAKIL THE DOG
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
#AFTER CODE REVIEW | |
def shakil_the_dog | |
response = nil | |
until (response == "go away") | |
puts "what would you like to say to Shakil?" | |
response = gets.chomp.downcase | |
case | |
when response == "woof" then puts "WOOF WOOF WOOF" | |
when response == ("shakil stop" || "Shakil STOP!") then puts "*no response*" | |
when response == "meow" then puts "woof woof woof woof woof" | |
when response.include?("treat") then puts "* ~ waiting patiently for treats ~ * " | |
else | |
puts "woof" | |
end | |
end | |
end | |
# Run our method | |
shakil_the_dog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment