From 6c4c2abe00b13a63a823f5137488b555a84c4642 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 3c19e1fb..dc745434 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",