|  | 
 
| 
x
马上注册,结交更多好友,享用更多功能^_^您需要 登录 才可以下载或查看,没有账号?立即注册  复制代码a=['xxx','xxx','xxx']#..............
from random import randint
from easygui import*
    #--------------------
def com(b,a1):
    w1=[]
    while 1:
        if b=='1' or b=='2' or b=='0':
            se=randint(1,43)
            if a1=='1':
                if (len(w1)==43 and b=='1'):
                    msgbox('循环了一遍了!',title='点名器',ok_button='继续')
                    break
                if (len(w1)==21 and b=='2') or (len(w1)==22 and b=='0'):
                    msgbox('循环了一遍了!',title='点名器',ok_button='继续')
                    break
                if se in w1:
                    continue
                w1.append(se)
            if b=='1' and se%2==1:
                continue
            if b=='0' and se%2==0:
                continue
            if boolbox('No: %d : %s' % (se,a[se-1]),title='点名器',choices=('退出','继续')):
                break
    #----------------------------
msgbox('',image='./文件/Greeting.gif',ok_button='准备点名')
while 1:
    b=str(indexbox('选择模式:',title='点名器',choices=('单班','双班','全班')))
    a1=str(boolbox('选择功能:',title='点名器',choices=('不重复','可以重复')))
    com(b,a1)
    if boolbox('退出吗?',title='点名器',choices=('确认退出','再次点名')):
        msgbox('',image='./文件/GoodBye.gif')
        break
 | 
 评分
查看全部评分
 |