/deaf_aunty.rb Secret
Last active
November 30, 2015 04:16
-
-
Save ianng89/f5956ac9c748d1cb270f 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
| =begin | |
| 1) Get user input | |
| 2) If user input is not in capital, return "HUH?! SPEAK UP, SANDRA!" | |
| 3) Elsif return "NO, WE CAN'T DO THAT!" | |
| 4) If user returns "I love ya, aunty, but I've got to go." | |
| =end | |
| puts "A wild aunty appeared! Say something!" | |
| user_input = gets.chomp | |
| # loop do | |
| until user_input == "I love ya, aunty, but I've got to go." | |
| if user_input != user_input.upcase | |
| puts "HUH?! SPEAK UP, SANDRA!" | |
| elsif user_input == "" | |
| user_input = gets.chomp | |
| if user_input == "" | |
| break | |
| end | |
| else | |
| puts "NO, WE CAN'T DO THAT!" | |
| end | |
| user_input = gets.chomp | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment