Number Pattern Code In Python For Games