Constraints are simply the subjects of an objective function.
The inequality that represents the constraint is: 
Represent the number of hats with x, and the number of scarves with y.
From the question, we have:
- He spends 12 hours to knit a hat
- He spends 6 hours to knit a scarf
So, the equation of the total time spent is:

This time spent is not more than 20 hours.
So, the inequality is

Hence, the inequality that represents the constraint is: 
Read more about constraints at:
brainly.com/question/24574823