Matching Monkey Moods
Sometimes a problem depends not on one value, but on whether two states match. Write a function monkey_trouble that takes two boolean flags: whether the first monkey is smiling a_smile and whether the second monkey is smiling b_smile. Return True if both monkeys are smiling or both are not smiling. If their moods are different, return False.
Примеры
Ввод
True, TrueВывод
TrueВвод
False, FalseВывод
TrueВвод
True, FalseВывод
FalseНужно реализовать
def monkey_trouble(a_smile: bool, b_smile: bool) -> bool:
Теги
math
Přihlaste se, abyste viděli historii odevzdání
Přihlásit sePřihlaste se, abyste mohli použít AI mentora
Přihlásit seVisible tests
1
Input
True, TrueExpected
True2
Input
False, FalseExpected
True3
Input
True, FalseExpected
False4
Input
False, TrueExpected
FalseFocus radio
Paused · SomaFM · Fluid