正在加载图片...
Conditional statements (if statements) Clause Syntax: if <conditional expression>: Always start with if clause <suite of statements> .Zero or more elif clauses elif <conditional expression>: <suite of statements> .Zero or one else clause,always else: at the end <suite of statements> Execution Rule for Conditional Statements: Each header is considered in order 1.Evaluate the header's conditional expression if the header is not an else 2.If the expression evaluates to true or the header is an else,execute the suite and skip the remaining headersConditional statements (if statements) if <conditional expression>: <suite of statements> elif <conditional expression>: <suite of statements> else: <suite of statements> Clause Syntax: ● Always start with if clause ● Zero or more elif clauses ● Zero or one else clause, always at the end Execution Rule for Conditional Statements: Each header is considered in order 1. Evaluate the header’s conditional expression if the header is not an else 2. If the expression evaluates to true or the header is an else, execute the suite and skip the remaining headers
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有