Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
712 B
1
Indexable
Never
import csv

id = 1000001
flag_miss_sbd = 0

while id <= 64900101:
  if "Lỗi" in get_info_by_id(Id_01) and flag_miss_sbd < 10:
    id = test_new_number(id)
  else:
      if not "Lỗi" in info:
        with open('output.csv', mode='w', newline='') as csv_file:
          fieldnames = ['Số báo danh', 'Mã Vùng Thi', 'Điểm']
          writer = csv.DictWriter(csv_file, fieldnames=fieldnames)
          writer.writeheader()
          info = get_info_by_id(id)
          writer.writerow(
              {
              'Số báo danh': id,
              'Mã Vùng Thi': info['ma_vung_thi'],
              'Điểm': info['diem']
          }
                          )
      id += 1