/deaf_aunty.rb Secret
Last active
August 29, 2015 14:14
-
-
Save weipee/96fca925d3d0e7b09d4d 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
| # 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 | |
| puts "Say something to Aunty!" | |
| me = gets | |
| puts me.inspect | |
| puts "hello" + me | |
| # puts "Say goodbye to aunty!" | |
| # me2 = gets.chomp | |
| while me != "I love ya, aunty, but I've got to go." | |
| if me == me.upcase | |
| puts "NO, WE CAN'T DO THAT!" | |
| else | |
| puts "HUH?! SPEAK UP, SANDRA!" | |
| end | |
| puts "Say goodbye to aunty!" | |
| me = gets.chomp | |
| break if me == "I love ya, aunty, but I've got to go." | |
| # else me2 = gets.chomp | |
| end | |
| end | |
| # Run our method | |
| deaf_aunty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment