From d3c2f0825acced44334769c1b90e328974e1052f Mon Sep 17 00:00:00 2001 From: zd6 <35508409+zd6@users.noreply.github.com> Date: Tue, 25 Jun 2019 02:53:00 -0500 Subject: [PATCH] translation smoothen index.md (#23426) translation corrected --- guide/chinese/python/if-elif-else-statements/index.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guide/chinese/python/if-elif-else-statements/index.md b/guide/chinese/python/if-elif-else-statements/index.md index e09b8a66fb..4acf172bed 100644 --- a/guide/chinese/python/if-elif-else-statements/index.md +++ b/guide/chinese/python/if-elif-else-statements/index.md @@ -18,7 +18,7 @@ if x > 4: print("The condition was true!") #this statement executes ``` -您可以选择添加`else`执行条件为`False`的代码块: +如果条件为`false` ,您可以选择添加在if代码块之后执行的`else`响应: ```python if not True: @@ -38,7 +38,7 @@ else: print("The condition wasn't true!") #this statement executes ``` -_请注意, `else`关键字后面没有条件 - 它捕获条件为`False`所有情况_ +_请注意, `else`关键字后面没有条件 - 它执行条件为if代码块未执行的所有情况_ 可以通过在初始`if`语句之后包含一个或多个`elif`来检查多个条件,但只执行一个条件: @@ -55,11 +55,12 @@ else: print("Neither will I!") #this statement does not execute ``` -_请注意,只有第一个计算为`True`条件才会执行。即使`z > 6`为`True` , `if/elif/else`块在第一个真实条件之后终止。这意味着只有在没有条件为`True`的情况下才会执行`else` 。_ +_请注意,只有第一个计算为`true`条件才会执行。即使`z > 6`为`true` , `if/elif/else`块`if/elif/else`在第一个真实条件之后终止。这意味着只有在else之前没有条件为`true`的情况下才会执行`else` 。_ 我们还可以创建嵌套if用于决策。在此之前请参阅前面的href ='https://guide.freecodecamp.org/python/code-blocks-and-indentation'target ='\_ blank'rel ='nofollow'>缩进指南。 -让我们举个例子来找一个偶数大于'10'的数字 +让我们举个例子来找既是一个偶数也大于'10'的数字 + ``` python x = 34