From 8dd5539c4eff723ac077a144e66bf121651b6448 Mon Sep 17 00:00:00 2001 From: zd6 <35508409+zd6@users.noreply.github.com> Date: Wed, 26 Dec 2018 16:27:20 -0800 Subject: [PATCH] optimized translation index.dm (#21208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * optimized translation index.dm corrected web translation mistakes. * fix some translation The terminal's official Chinese name is ‘终端’, So I changed it, but I think use ‘控制台’ or use the English 'Terminal' also make sense. Anyway, I think readers can understand that. --- .../python/while-loop-statements/index.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/guide/chinese/python/while-loop-statements/index.md b/guide/chinese/python/while-loop-statements/index.md index 357b6648593..294e324433b 100644 --- a/guide/chinese/python/while-loop-statements/index.md +++ b/guide/chinese/python/while-loop-statements/index.md @@ -4,7 +4,7 @@ localeTitle: 循环语句 --- ## 循环语句 -Python使用`while`循环与其他流行语言类似。 `while`循环计算条件,然后在条件为真时执行代码块。代码块重复执行,直到条件变为false。 +Python使用`while`循环的方式与其他流行的计算机语言类似。 `while`循环判断条件,然后在条件为真时执行代码块。代码块重复执行,直到条件变为false。 基本语法是: @@ -38,17 +38,17 @@ Today is Monday 逐行解释上述代码: -1. 变量'days'设置为值0。 -2. 将变量周分配给包含一周中所有日期的列表。 +1. 将变量'days'设置为值0。 +2. 将变量'week'设为给包含一周中所有日期的列表。 3. while循环开始 4. 代码块将被执行,直到条件返回'true'。 -5. 条件是'days <7',其中rougly说运行while循环直到变量天数小于7 +5. 条件是'days <7',简单地讲是要运行while循环,直到变量‘days’不小于7 6. 所以当days = 7时,while循环停止执行。 -7. days变量在每次迭代时都会更新。 -8. 当while循环第一次运行时,“Today is Monday”行被打印到控制台上,变量days变为等于1。 +7. 'days'变量在每次迭代时更新。 +8. 当while循环第一次运行时,“Today is Monday”行被打印到终端上,变量'days'变为等于1。 9. 由于变量天数等于1,小于7,因此再次执行while循环。 -10. 它一次又一次地进行,当控制台打印出“今天是星期天”时,变量天数现在等于7,而while循环停止执行。 +10. 它循环进行,当控制台打印出“今天是星期天”时,变量天数现在等于7,而while循环停止执行。 #### 更多信息: -* [Python `while`语句文档](https://docs.python.org/3/reference/compound_stmts.html#the-while-statement) \ No newline at end of file +* [Python `while`语句文档](https://docs.python.org/3/reference/compound_stmts.html#the-while-statement)