Created
July 23, 2021 14:11
-
-
Save sergiors/437b6e376e90bc7c10ee3ae8ce376ea7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def should_i_wear_this_hat(self, hat): | |
if not isinstance(hat, Hat): | |
return False | |
current_fashion = get_fashion() | |
weather_outside = self.look_out_of_window() | |
is_stylish = self.evaluate_style(hat, current_fashion) | |
if weather_outside.is_raining: | |
print("Damn.") | |
return True | |
print("Great.") | |
return is_stylish | |
def should_i_wear_this_hat(self, hat): | |
if not isinstance(hat, Hat): | |
return False | |
weather_outside = self.look_out_of_window() | |
if weather_outside.is_raining: | |
print("Damn.") | |
return True | |
print("Great.") | |
current_fashion = get_fashion() | |
return self.evaluate_style(hat, current_fashion) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment