/deaf_aunty.rb Secret
Last active
November 30, 2015 21:20
-
-
Save andrewclk/5ce27d54ddf3671189eb to your computer and use it in GitHub Desktop.
Revisions
-
andrewclk revised this gist
Nov 30, 2015 . 1 changed file with 9 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,27 +4,25 @@ def speak deaf_aunty(user_input) end def deaf_aunty(input) if input == input.downcase puts "HUH?! SPEAK UP, SANDRA!" speak elsif input == input.upcase then puts "NO, WE CAN'T DO THAT!" puts "SAY YOU LOVE ME POLITELY IF YOU WANT TO LEAVE!" puts "Maybe like - I love ya, aunty, but I've got to go." speak elsif input == "I love ya." || input = 2.times{"\n"} puts "Thank you Sandra, you may go now. :)" else puts "HUH?! SPEAK UP, SANDRA!" speak end end puts "Hello, Sandra, anything you want?" user_input = gets.chomp deaf_aunty(user_input) -
andrewclk revised this gist
Nov 30, 2015 . 1 changed file with 13 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,24 +3,28 @@ def speak user_input = gets.chomp deaf_aunty(user_input) end def deaf_aunty(input) if input == input.upcase then puts "NO, WE CAN'T DO THAT!" puts "SAY YOU LOVE ME POLITELY IF YOU WANT TO LEAVE!" puts "Maybe like - I love ya, aunty, but I've got to go." speak elsif input == input.downcase then puts "HUH?! SPEAK UP, SANDRA!" speak end until input == "I love ya, aunty, but I've got to go." || " " puts "Thank you Sandra, you may go now. :)" end end puts "Hello, Sandra, anything you want?" user_input = gets.chomp deaf_aunty(user_input) -
andrewclk revised this gist
Nov 30, 2015 . 1 changed file with 23 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,26 @@ def speak puts"NOW TRY AGAIN!" user_input = gets.chomp deaf_aunty(user_input) end def deaf_aunty(input) if input == input.downcase puts "HUH?! SPEAK UP, SANDRA!" puts "YOU NEED SHOUT IT OUT, I COULDN'T HEAR YOU!" speak end if input == input.upcase puts "NO, WE CAN'T DO THAT!" puts "SAY YOU LOVE ME POLITELY IF YOU WANT TO LEAVE!" puts "Maybe like - I love ya, aunty, but I've got to go." speak end if input == "I love ya, aunty, but I've got to go." puts "Thank you Sandra, you may go now. :)" end end puts "Hello, Sandra, anything you want?" user_input = gets.chomp deaf_aunty(user_input) -
code-division renamed this gist
Sep 22, 2014 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,14 @@ # Save this file to your computer so you can run it # via the command line (Terminal) like so: # $ ruby deaf_aunty.rb # # Your method should wait for user input, which corresponds # to you saying something to your Aunty. # You'll probably want to write other methods, but this # encapsulates the core Aunty logic def deaf_aunty end # Run our method deaf_aunty -
code-division created this gist
Aug 31, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ # Save this file to your computer so you can run it # via the command line (Terminal) like so: # $ ruby deaf_grandma.rb # # Your method should wait for user input, which corresponds # to you saying something to your Grandma. # You'll probably want to write other methods, but this # encapsulates the core Grandma logic def deaf_grandma end # Run our method deaf_grandma