Import Random NUM = (INPUT ( ' Number of input to purchase lottery: ' )). Strip () IF NUM and num.isdigit () and int (NUM)> 0: L2 = [] for I in Range (int (NUM )): L = [] the while len (L) <. 5 : B = the random.randint (. 1, 35 ) B = STR (B) .zfill (2 ) IF B Not in L: l.append (B) L. sort () B= random.randint(1, 12) b = str(b).zfill(2) l.append(b) while len(l) < 7: b = random.randint(1, 2) b = str(b).zfill(2) if int(b) == int(l[5]): continue elif int(b) > int(l[5]): l.append(b) else: l.insert(5, b) if l not in l2: l2.append(l) qian = L2 [I] [:. 5 ] HOU = L2 [I] [- 2 :] Print ( ' % s of note lottery, the front region:% s, the area:% s ' % (I, Qian, HOU)) the else : Print ( ' input error ' )