From 84c21366d6bc4c7a9047e5522468254ca3f7009d Mon Sep 17 00:00:00 2001 From: Bryan Jennings Date: Tue, 24 Oct 2017 18:05:59 -0700 Subject: [PATCH] Simplify logic for is_ace and is_face_card in deck of cards solution (#113) --- .../object_oriented_design/deck_of_cards/deck_of_cards.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solutions/object_oriented_design/deck_of_cards/deck_of_cards.ipynb b/solutions/object_oriented_design/deck_of_cards/deck_of_cards.ipynb index 3c19e1fbe98..dc74543436f 100644 --- a/solutions/object_oriented_design/deck_of_cards/deck_of_cards.ipynb +++ b/solutions/object_oriented_design/deck_of_cards/deck_of_cards.ipynb @@ -89,11 +89,11 @@ " super(BlackJackCard, self).__init__(value, suit)\n", "\n", " def is_ace(self):\n", - " return True if self._value == 1 else False\n", + " return self._value == 1\n", "\n", " def is_face_card(self):\n", " \"\"\"Jack = 11, Queen = 12, King = 13\"\"\"\n", - " return True if 10 < self._value <= 13 else False\n", + " return 10 < self._value <= 13\n", "\n", " @property\n", " def value(self):\n",