added a reference python code for logic design