Using atoms in this way also extends to Boolean logic, with the availability of true and false atoms to identify the Boolean result of a statement.
还可以将原子值的这种使用方法扩展到布尔逻辑,利用原子值true和false来标识语句的布尔结果。
The if statement supports an optional else clause that indicates a block of program statements that should be processed if the Boolean expression evaluates False.
if语句支持一个可选的else子句,指示当布尔表达式计算为False时应该处理的程序语句块。
Up to this point, you've seen how the if statement can be used to execute one of two blocks of program statements, depending on the value of a particular Boolean expression.
至此,已经看到了if语句可以如何用于根据一个特定布尔表达式的值,来执行两个程序语句块中的其中一个。
But now the second if statement evaluates True because the variable I is evenly divisible by 125 (and the not operator turns the resulting 0 into a Boolean True).
但是第二个if语句计算为True,因为变量i能被125整除(并且not运算符将结果0转换成布尔值True)。
But now the second if statement evaluates True because the variable I is evenly divisible by 125 (and the not operator turns the resulting 0 into a Boolean True).
但是第二个if语句计算为True,因为变量i能被125整除(并且not运算符将结果0转换成布尔值True)。
应用推荐