/deaf_aunty.rb Secret
Created
September 11, 2015 10:17
-
-
Save benjaminyeo/5022fb23f4a0fbf41cfc to your computer and use it in GitHub Desktop.
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 characters
| def get_input | |
| print "Say something" | |
| input = gets.chomp | |
| end | |
| def deaf_aunty | |
| sandra = get_input | |
| while sandra != "I love ya, aunty, but i've got to go." | |
| shout = sandra.upcase | |
| if sandra != shout | |
| puts "HUH?! SPEAK UP, SANDRA!" | |
| sandra = get_input | |
| elsif sandra == "" | |
| sandra = get_input | |
| break if sandra == "" | |
| elsif sandra == shout | |
| puts "NO, WE CAN'T DO THAT!" | |
| sandra = get_input | |
| end | |
| end | |
| end | |
| deaf_aunty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment