Skip to content

Instantly share code, notes, and snippets.

@ks--ks
Created August 15, 2020 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ks--ks/4d5cb6926710a6f54134e6afaf2e4eed to your computer and use it in GitHub Desktop.
Save ks--ks/4d5cb6926710a6f54134e6afaf2e4eed to your computer and use it in GitHub Desktop.
'''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