This commit is contained in:
2025-04-14 18:40:57 +08:00
parent 4aaec10e61
commit 97ec101001
5 changed files with 28 additions and 3 deletions

BIN
src/learn/07/gif1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
src/learn/07/gif2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
src/learn/07/image1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@@ -1 +1,26 @@
擦边视频
自测猫有个功能是可以看见循环过程的,叫做【可视化调试】,打开 [自测猫](https://code.xuyue.cc)
复制以下代码到自测猫
```py
print("我要开始循环啦!")
i=0
while i<10:
print("我在循环内", i)
i=i+1
print("结束循环啦!")
```
点击红色的【调试】按钮,弹出调试框:
![](./image1.png)
绿色箭头表示当前正在执行,红色箭头表示下一步要执行。点击下一步,开始调试。
![](gif1.gif)
当然你也可以来回拖动进步条,这样代码就会跟着你的想法,想走到哪一步就走到哪一步。
![](gif2.gif)
右侧可以看到当前变量的值。

View File

@@ -2,6 +2,6 @@
会赢的!
不是,你怎么说话带空格啊?
你这身高绝对没有1米76
优美的Python语言之fuck-string
优美的Python语言之f**k-string
全都怪我,不该沉默时沉默
点我看擦边视频
可以看到的循环