Created
August 15, 2020 23:16
-
-
Save ks--ks/4d5cb6926710a6f54134e6afaf2e4eed 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
'''We have two monkeys, a and b, and the parameters a_smile and b_smile | |
indicate if each is smiling. We are in trouble if they are both smiling | |
or if neither of them is smiling. Return True if we are in trouble.''' | |
''' | |
monkey_trouble(True, True) → True | |
monkey_trouble(False, False) → True | |
monkey_trouble(True, False) → False | |
''' | |
def monkey_trouble(a_smiled, b_smiled): | |
return a_smiled == b_smiled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment