why is it showing wrong answeer?

Describe your issue



Screenshot

Additional info

Your if condition is wrong. Just having b less than 10 is not enough. Can you think about what should it be changed to?