import easygui as g
import sys
while 1:
g.msgbox("欢迎进入我的第一个小游戏")
msg = "我学python到底有没有用"
title = "灵魂拷问"
choices = ["有用", "没用", "我也不知道"]
choice = g.choicebox(msg, title, choices)
g.msgbox("你的选择是:" + str(choice), "结果") #前面是输出的东西 后面是title
msg = "你希望重新选择吗"
title = "请选择"
if g.ccbox(msg, title): #创建一个确认或者否认
pass
else:
sys.exit()
python 关于easygui的第一个小游戏
最新推荐文章于 2024-05-02 05:21:12 发布