Files
python/exercises/practice/bob/.approaches/answer-list/snippet.txt
Bob Hoeppner a91777d7d8 Bob approaches fixes (#3201)
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
2022-11-17 04:05:24 -06:00

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]