Maths Playground Number Pattern In Python