Python Program For Number Pattern Questions