Python Program For Number Pattern Solver