Oct-30-2018, 02:38 AM
Think about it: you only want to return True if no number plus it's own digits equals n. So you need to check all of the numbers up to n-1 before returning True. So
return True
(you don't need the parentheses) should come after the loop, not inside it as you have it now.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures