#求助 在Codecademy学Python,有个习题不会做! - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
hsumin
V2EX    程序员

#求助 在Codecademy学Python,有个习题不会做!

  •  
  •   hsumin 2013-11-08 11:25:55 +08:00 4862 次点击
    这是一个创建于 4404 天前的主题,其中的信息可能已经有所发展或是发生改变。
    求助Python大大,教教小的,怎么修改,是Conditionals & Control Flow这一章的第15个习题

    题目是这样的:
    Write an if statement in the_flying_circus(). It must include:

    and, or, or not;
    ==, !=, <, <=, >, or >=;
    an if, elif, AND else statement;
    it must return True when evaluated.

    我的代码是这样的:
    def the_flying_circus():
    # Start coding here!
    if 1 > 5:
    return False
    elif True and False != True:
    return True
    else:
    return False
    print the_flying_circus()
    print the_flying_circus()
    print the_flying_circus()
    9 条回复    1970-01-01 08:00:00 +08:00
    nodejx
        1
    nodejx  
       2013-11-08 11:43:21 +08:00
    def the_flying_circus():
    # Start coding here!
    if 1>0:
    return (True or False and (not False))
    elif False:

    return True
    else:
    return True

    the_flying_circus()

    随手一些,貌似通过了。。。
    acpp
        2
    acpp  
       2013-11-08 12:03:43 +08:00
    @nodejx 头像有大图吗
    nodejx
        3
    nodejx  
       2013-11-08 12:33:19 +08:00
    @acpp http://www.p1.cn/
    只能说这里有。
    kennedy32
        4
    kennedy32  
       2013-11-08 13:13:57 +08:00 via Android
    我记得这个自带论坛的
    EthanZhu
        5
    EthanZhu  
       2013-11-08 13:18:13 +08:00
    @nodejx 这个要邀请才能注册?
    nodejx
        6
    nodejx  
       2013-11-08 14:10:14 +08:00
    @EthanZhu taobao
    ChiangDi
        7
    ChiangDi  
       2013-11-08 20:07:34 +08:00 via Android
    @acpp 同感:-D
    这个头像看起来真的很可爱呢
    acpp
        8
    acpp  
       2013-11-08 20:25:34 +08:00
    @ChiangDi 你也去那个网站找下,看看哪个是大图
    ChiangDi
        9
    ChiangDi  
       2013-11-08 21:44:06 +08:00
    @acpp 注册不了,貌似是个很高端的组织,不让进
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2680 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 23ms UTC 13:21 PVG 21:21 LAX 05:21 JFK 08:21
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86