Skip to content

Instantly share code, notes, and snippets.

@josh1812
Forked from nextacademy-private/deaf_aunty.rb
Last active August 29, 2015 14:24
Show Gist options
  • Save josh1812/595394c817531deea50f to your computer and use it in GitHub Desktop.
Save josh1812/595394c817531deea50f to your computer and use it in GitHub Desktop.
# original count/status
ctr = 0
hello = gets.chomp
# print out the raw
puts hello.inspect
# ctr += 1 if hello == ""
# print out what's ctr (iaw status)
#puts ctr
until (hello == "I love ya, aunty, but I've got to go.")
if hello == ""
ctr += 1
break if ctr >= 2
elsif (hello == hello.downcase)
puts "HUH?! SPEAK UP,SANDRA!"
ctr = 0 if ctr == 1
else
puts "NO,WE CAN'T DO THAT!"
ctr = 0 if ctr == 1
end
hello = gets.chomp #get another input besides the very initial one
puts hello.inspect
puts ctr
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment