Final isShout and isQuestion remnants changed to is_shout and is_question. * Update introduction.md * Update snippet.txt * Update content.md * Update snippet.txt * Update content.md * Update snippet.txt * Update content.md * Update content.md * Update Benchmark.py * Update content.md
7 lines
245 B
Plaintext
7 lines
245 B
Plaintext
ANSWERS = ['Whatever.', 'Sure.', 'Whoa, chill out!',
|
|
"Calm down, I know what I'm doing!"]
|
|
# code snipped
|
|
is_shout = 2 if hey_bob.isupper() else 0
|
|
is_question = 1 if hey_bob.endswith('?') else 0
|
|
return ANSWERS[is_shout + is_question]
|