← Back to challenges

Two Makes Ten

PythonMediumalgorithmsconditionsvalidation

Instructions

Create a function that takes two arguments. Both arguments are integers, a and b. Return True if one of them is 10 or if their sum is 10.

Examples

makes10(9, 10) ➞ True

makes10(9, 9) ➞ False

makes10(1, 9) ➞ True

Notes

Don't forget to return the result.

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Profitable Gamble