Skip to content

Instantly share code, notes, and snippets.

@nextacademy-private
Last active November 27, 2023 01:09
Show Gist options
  • Save nextacademy-private/a64f2e55e54ae1e3e6aa to your computer and use it in GitHub Desktop.
Save nextacademy-private/a64f2e55e54ae1e3e6aa to your computer and use it in GitHub Desktop.
# 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
end
# Run our method
deaf_aunty
@djoeyfaizal
Copy link

Problem:

  1. If you say something but don't shout, she'll shout back "..."
  2. If you do shout, she'll shout back "..."
  3. She won't leave the room unless you say "..."

Pseudocode:

say something to granny

if you don't shout

if you do shout

if you say the magic line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment