鱼C论坛

 找回密码
 立即注册
查看: 2750|回复: 0

关于零基础入门学习python的第一个界面程序问题

[复制链接]
发表于 2016-9-2 11:07:44 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
import easygui as g
import sys

while 1:
    g.msgbox = ("嗨,欢迎进入第一个界面小游戏^_^")

    msg ="请问你希望在鱼C工作室学习到什么知识呢?"
    title = "小游戏互动"
    choices = ["谈恋爱", "编程", "OOXX", "琴棋书画"]
        
    choice = g.choicebox(msg, title, choices)

    # note that we convert choice to string, in case
    # the user cancelled the choice, and we got None.
    g.msgbox = ("你的选择是: " + str(choice), "结果")

    msg = "你希望重新开始小游戏吗?"
    title = "请选择"
        
    if g.ccbox(msg, title):     # show a Continue/Cancel dialog
        pass  # user chose Continue
    else:
        sys.exit(0)     # user chose Cancel
为什么我的g.msgbox后面要加=程序才能运行?
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-2-22 13:53

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表