Target Ten
This kind of check is like a discount rule: it works if the target number is already present or appears as a sum. Write a function makes10 that takes two integers a and b. Return True if either number is 10 or if their sum is 10; otherwise, return False.
Примеры
Ввод
9, 10Вывод
TrueВвод
9, 9Вывод
FalseВвод
1, 9Вывод
TrueНужно реализовать
def makes10(a: int, b: int) -> bool:
Теги
math
Prisijunkite, kad matytumėte pateikimų istoriją
PrisijungtiPrisijunkite, kad naudotumėte DI mentorių
PrisijungtiVisible tests
1
Input
9, 10Expected
True2
Input
9, 9Expected
False3
Input
1, 9Expected
True4
Input
10, 1Expected
True5
Input
5, 5Expected
True6
Input
-9, 10Expected
TrueFocus radio
Paused · SomaFM · Fluid