python sequential code written with samples added