Six Check
This check helps you practice several conditions at once: a direct value, a sum, and a difference. Write a function love6 that takes two integers a and b. Return True if either number is 6, if their sum is 6, or if the absolute difference between them is 6. Otherwise, return False.
Примеры
Ввод
6, 4Вывод
TrueВвод
4, 5Вывод
FalseВвод
1, 5Вывод
TrueНужно реализовать
def love6(a: int, b: int) -> 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
6, 4Expected
True2
Input
4, 5Expected
False3
Input
1, 5Expected
True4
Input
3, 3Expected
True5
Input
1, 7Expected
True6
Input
2, 5Expected
FalseFocus radio
Paused · SomaFM · Fluid