习题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.")
应该看到的结果
巩固练习
- 弄清楚#字符的作用
- 打开ex2.py文件,进行检查。