mark six python
# Marksix program
# by cmLai, 2024-11-23
import random
# var
# marksix49: numbers 1 to 49
# mark6 : the result 6 numbers
# max : quantities of numbers, minus 1 after 1 random number is chosen
marksix49 = []
# generate the list 1-49
for i in range (1, 50) :
marksix49.append(i)
print (marksix49)
mark6 = []
max = 49
random.seed()
# draw the 6 numbers routine
for j in range (6):
tmp = random.randrange(max)
tmp2 = marksix49.pop(tmp)
max -= 1
mark6.append(tmp2)
print (mark6)
print ()
print (marksix49)
mark6.sort()
print (mark6)
# by cmLai, 2024-11-23
# Marksix program