The Black Codes were laws passed By Southern States in 1865 and 1866 in the United States after the American Civil War with the intent and the effect of restricting African Americans freedoms and of compelling them to work in a labor economy based on low wages or debt.
You may want to re read the question