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
PostgreSQLv16

Hier verschijnt het resultaat van je code

Visible tests
1
Input
True, True
ExpectedTrue
2
Input
False, False
ExpectedTrue
3
Input
True, False
ExpectedFalse
4
Input
False, True
ExpectedFalse
Focus radio
Paused · SomaFM · Fluid