Skip to content

Commit

Permalink
fix:Turn off code repl
Browse files Browse the repository at this point in the history
  • Loading branch information
ptsfdtz committed Feb 29, 2024
1 parent 1929001 commit 047d669
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Python/Chapter7.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 1. While 循环语句

```sh
```py,norepl
while 判断条件(condition):
执行语句(statements)……
```
Expand Down Expand Up @@ -49,7 +49,7 @@ while j < 5:

while 语句中如果 `条件``true`的情况时,循环会无限的执行下去,下面是示例:

```py
```py,norepl
# !!不建议尝试运行
i = 0
while True:
Expand All @@ -74,7 +74,7 @@ else:

假如你的 while 循环体只有一条语句的话,可以使用一行 while 语句来实现。

```py
```py,norepl
# !!不建议尝试运行
condition = True
while(condition):print ("Hello World!")
Expand Down
10 changes: 10 additions & 0 deletions src/Python/Chapter8.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# for 循环

## for 语句

for 循环可以迭代一个可迭代对象,例如一个列表或者一个字符串。

格式一般如下:

```
for
```

0 comments on commit 047d669

Please sign in to comment.