Hint to help you get started: (hopefully you have to hit 'read more' to see this!)
Consider the premise that you should not need to bruteforce the code, at all: The questions, when answered correctly, will only ever lead you to a single possibility of numbers that can be the code.
Then, look at the fifth question first. What would have to be true for this question to indicate a singular numeric answer, between 1-9?
More direct hint in next comment.