How to find if a number is less than or greater than 10 for difference.
Example1: If a is 100 and b is 91. This is almost Matching.
Example2: If a is 100 and b is 89. This is not at all Matching.
Below is the code and its working fine. Is there any other easiest or best way to achieve
a = 110
b = 100
c = a - b
d = a - 10
if a > b:
if (a - b) <= 10:
print "This is almost Matching"
else:
print "This is not at Matching"
else:
if (b - a) <= 10:
print "This is almost Matching"
else:
print "This is not at Matching"
Expected and actual are getting same