# A Truth By Any Other Name

Codingbat has a practice question:

**Logic-1, Python. It’s called near_10.**

You can find it here: https://codingbat.com/prob/p165321

**The Question**

Given a non-negative number “num”, return True if num is within 2 of a multiple of 10. Note: (a % b) is the remainder of dividing a by b, so (7 % 5) is 2

After struggling, I find one solution on GitHub:

`def near_ten(num):`

within = num%((num/10)*10) if num >= 10 else num

return within in [8,9,0,1,2]

This is accepted as the correct answer as expressed in the code-check table. All the True rows are returned True and all the False rows, False.

However, in a Jupyter Notebook, when I pass the False examples from the above table in the function near_ten() I get conflicting outcomes. There are some True returns.

Hmmmm, The answers don’t align

I search Stack Overflow and find an answer by UltraInstinct that works

https://stackoverflow.com/questions/43601461/python-near-ten-function-method

I run the new Stack Overflow solution in the same manner as above in a Jupyter Notebook and receive the desired outputs. All of the rows are correctly marked False.

So hopefully you’ve come here because you Googled the codingbat question and have been guided away from thinking your answer was correct.

I contacted codingbat about the issue, but received no response. Stack Overflow was not very welcoming of the idea of me posting this problem on the site. But that is a story for another day.