Verily interview question

simulate a processor using python