python习题教程 全50个 (不定时更新)EP2

习题2:注释和#号

程序代码:

1  # A comment, this is so you can read your program later.
2  # Anything after the # is ignored by python.
3
4  print("I could have code like this.") # and the comment after is ignored
5
6  # You can also use a comment to "disable" or comment out code:
7  # print("This won't run.")
8
9  print("This will run.")

应该看到的结果

python习题教程 全50个 (不定时更新)EP2_第1张图片
巩固练习

  1. 弄清楚#字符的作用
  2. 打开ex2.py文件,进行检查。

你可能感兴趣的:(python习题教程 全50个 (不定时更新)EP2)