PYTHON(控制和条件流程)

时间:2017-01-12 14:09:04

标签: python conditional controls flow-control

# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if ______:    # Start coding here!
        # Don't forget to indent
        # the code inside this block!
    elif _____
        # Keep going here.
        # You'll want to add the else statement, too!

请帮忙

1 个答案:

答案 0 :(得分:0)

这是来自codecademy的教程。说明是:

在the_flying_circus()中写一个if语句。它必须包括:

  1. if,elif,and else statements;
  2. 至少有一个和,或,或不;
  3. 比较器(==,!=,<,< =,>,或> =);
  4. 最后,the_flying_circus()在评估时必须返回True。 不要忘记在你的if语句之后加入:
  5. 所以你必须用比较来填充带下划线的部分,例如34> 33.并使用被问到的比较器。你的函数应该总是返回True,所以写一个比较,如1>在if或elif语句中为0,总是如此。但也许你卡在别的地方或忘了冒号。 希望我能帮助你。否则解释你被困的地方。