main.py
Costs 1 credit
加载编辑器中...
输出 Output执行成功
# 运行代码后,输出将显示在这里 # 按 Ctrl+Enter 快速运行
Terminal (Simulated)Install commands are simulated only, no real network requests
$
Step 1: 穿上隐形衣
Audio Instructor
0:00 / 0:00
在 Python 中,# 号具有魔力。只要你在行首加上它,整行代码就会对计算机“消失”。这叫注释 (Comment)。
底层逻辑:
当 Python 解释器看到
当 Python 解释器看到
# 时,它会停止扫描这一行的剩余部分,直接跳到下一行。
你的任务:
- 在第一行写下:
# 这是一个注释,计算机会忽略我 - 在第二行输出
你好,Python
Self-Check List
- 添加注释
- 理解注释不影响程序运行
Transfer Template
代码:# 随便写点什么
print("你好,Python")After completing this step, you should be able to independently explain and reproduce this concept, then apply it to similar problems.