Same Monkey Mood
This check helps you practice comparing two boolean values with each other. 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 in the same state: both smiling or both not smiling. If their states are different, there is no trouble, so return False.
Примеры
Ввод
True, TrueВывод
TrueВвод
False, FalseВывод
TrueВвод
True, FalseВывод
FalseНужно реализовать
def monkey_trouble(a_smile: bool, b_smile: bool) -> bool:
Теги
math
Log in om je inzendingsgeschiedenis te zien
InloggenLog in om de AI-mentor te gebruiken
InloggenVisible tests
1
Input
True, TrueExpected
True2
Input
False, FalseExpected
True3
Input
True, FalseExpected
False4
Input
False, TrueExpected
FalseFocus radio
Paused · SomaFM · Fluid