Since the question clearly states:
The condition should not use both IN and OR operators.
use could use:
where DatePart(m, ) IN (1,3,4,5,7,8)
OR is not used, so since they BOTH aren't used, this is valid.
you also could use:
where DatePart(m, date) = 1
or DatePart(m, date) = 3 ....
as long as you don't use IN, this also would satisify the requirement not to use both.
The question should have stated
The condition should not use either the IN and OR operators.
Yes, I know what was meant. But the requirements didn't adequately specify the intention.