Added Python equiv of Scratch solution for PE2