|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- import easygui as f
- import sys
- import random
- image = ['',('C:\\Users\\Administrator\\Desktop\\唯美gif\\1_1.gif'),
- ('C:\\Users\\Administrator\\Desktop\\唯美gif\\1_2.gif'),
- ('C:\\Users\\Administrator\\Desktop\\唯美gif\\191600036a49c167ff2f.gif'),
- ('C:\\Users\\Administrator\\Desktop\\唯美gif\\20140221_0849868a1540cbb51000sAhClCfLagfc.gif'),
- ('C:\\Users\\Administrator\\Desktop\\唯美gif\\3448054951011226260_500x281_210.gif'),
- ('C:\\Users\\Administrator\\Desktop\\唯美gif\\6608499190027452196.gif')
- ]
- title = '欢迎来到鱼油的第一个gui编程!'
- choices_00 = ('exit', 'regret')
- choices_01 =('Java','python','c#','c++')
- photos = 6
- secret = random.randint (1,photos)
- fields = ('account', 'password')
- personal_information = {}
- name = f.enterbox('请输入姓名:', title = title)
- information = f.multpasswordbox('请输入你要注册的账号和密码',title = title, fields = fields, values = ())
- personal_information_new = {name :information}
- personal_information.update(personal_information_new)
- print (name + '的账号是:' +personal_information[name][0] + ';\n' + name + '的密码是:' +personal_information[name][1] + '.')
- while 1:
- answer_1 = f.boolbox('你是来学习编程的吗?', title = title, image = image[secret] )
- secret = random.randint (1,photos)
- if answer_1 == 1:
- f.msgbox ('请加我qq问我要教学文件', title = title, image = image[secret])
- print ('他来学编程啦!')
- language = f.buttonbox('你想学哪种语言???',title = title,image = image[secret],choices = choices_01)
- if language == choices_01[1]:
- secret = random.randint (1,photos)
- f.msgbox('你来对啦!!!恭喜哈',title = title, image = image[secret])
- print('他选的' + language + '语言')
- break
- else:
- secret = random.randint (1,photos)
- f.msgbox('不好意思,我只会python',title = title , image = image[secret])
- print('他选的' + language + '语言')
- break
- elif answer_1 == 0:
- secret = random.randint (1,photos)
- answer_11 = f.buttonbox ('请按按退出键结束', title = title, image = image[secret], choices = choices_00)
- if answer_11 == 'exit':
- print('他退出啦,真遗憾!')
- break
- else:
- print('后悔啦,来学编程啦')
- input('请按任意键结束。')
-
-
-
-
复制代码
      
在shell用ctrl+c试试
实在不行从任务管理器中删除
|
|