diff --git a/solutions/python/bob/1/bob.py b/solutions/python/bob/1/bob.py new file mode 100644 index 0000000..973229d --- /dev/null +++ b/solutions/python/bob/1/bob.py @@ -0,0 +1,24 @@ +def response(hey_bob): + # Fix the Indentation for all lines below! + trimmed_input = hey_bob.strip() + + # Yelling a Question (Most Specific) + if trimmed_input.endswith('?') and trimmed_input.isupper(): + return "Calm down, I know what I'm doing!" + + # Yelling (Next Specific) + # Be careful not to count empty strings or questions as yelling! + elif trimmed_input.isupper(): + return "Whoa, chill out!" + + # Question (Next Specific) + elif trimmed_input.endswith('?'): + return "Sure." + + # Silence + elif trimmed_input == '': + return "Fine. Be that way!" + + # Anything Else + else: + return "Whatever."