bob exercise

This commit is contained in:
Xevion
2019-07-14 04:05:00 -05:00
parent 83c3b8a76c
commit 7621525406
4 changed files with 176 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
def response(hey_bob):
if hey_bob.strip() == '':
return "Fine. Be that way!"
elif hey_bob.upper() == hey_bob and ''.join(x.upper() for x in hey_bob if x.upper() in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') != '':
return "Calm down, I know what I'm doing!" if hey_bob.strip().endswith('?') else "Whoa, chill out!"
elif hey_bob.strip().endswith('?'):
return "Sure."
else:
return "Whatever."