-
-
Save iamnoobkia/0cabc080fc0fa166a0b2 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 crazy_aunty | |
| puts "Hi Sandra! Say hi to deaf Aunty :)" | |
| n = 0 | |
| while answer = gets.chomp | |
| if answer.empty? | |
| n+=1 | |
| break if n==2 | |
| elsif answer == "I love ya, Aunty, but I've got to go." | |
| puts "Bye, Sandra!" | |
| break | |
| elsif answer == answer.downcase | |
| puts "HUH?! SPEAK UP, SANDRA" | |
| else answer == answer.upcase | |
| puts "NO! WE CANT DO THAT!" | |
| end | |
| end | |
| end | |
| crazy_aunty |
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 deaf_aunty | |
| puts "Hi Sandra! Say hi to deaf Aunty :)" | |
| sandra_input = gets.chomp | |
| while sandra_input != "I love you, aunty, but I've got to go." | |
| if sandra_input == sandra_input.upcase | |
| puts "NO, WE CAN'T DO THAT!" | |
| sandra_input = gets.chomp | |
| else sandra_input == sandra_input.downcase | |
| puts "HUH?! SPEAK UP, SANDRA" | |
| sandra_input = gets.chomp | |
| end | |
| end | |
| puts "Bye, Sandra!" | |
| end | |
| deaf_aunty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment