Verily Interview Question

simulate a processor using python