Encoding logic rules in machine learning
I would suggest you apply these rules to the output of your model after it has predicted the results.  In your example, if you are building a DNN classifier that predicts pass or fail, then before you return the prediction back to the calling application, simply check the value and update the model results based on the criteria you have established.

I have performed this in various models where the model may return negative results which are impossible.  In those cases, I would perform a simple update to the results data frame such as:

data.loc[data["y-hat"] &lt; 0, "y-hat"] = 0


You can have as many of these types of 'hard-coded' rules as you need. You can even build a dictionary for them and map the results rather than having a series of statements. That obviously depends on the complexity of the rules. 
Hope that helps.