The problem "Given 2 ints, a and b, return True if one if them is 10 or if their sum is 10."
In the first test why does entering (9,9) and (8,3) return True?
I have since solved the problem using a different solution (further below) but I am struggling to understand why the first solution does not work since neither integer is 10 nor do they equal 10 when summed together!
Thanks for your help.
def makes10(a, b):
if a or b == 10:
return True
if a + b == 10:
return True
else:
return False
def makes10(a, b):
if a == 10:
return True
if b == 10:
return True
if a + b == 10:
return True
else:
return False