From 99a8c9fac0b7322c6dc1b8147ec5b40f5de1cd59 Mon Sep 17 00:00:00 2001 From: "exercism-solutions-syncer[bot]" <211797793+exercism-solutions-syncer[bot]@users.noreply.github.com> Date: Sun, 9 Nov 2025 20:14:30 +0000 Subject: [PATCH] [Sync Iteration] python/bob/1 --- solutions/python/bob/1/bob.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 solutions/python/bob/1/bob.py 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."