gray code on lab_2.py need completion