加分题
1. 弄清楚”#” 符号的作用。而且记住它的名字。 (中文为井号,英文为 octothorpe 或者 pound character)。
2. 打开你的 ex2.py 文件,从后往前逐行检查。从最后一行开始,倒着逐个单词单词检查回去。
3. 有没有发现什么错误呢?有的话就改正过来.
4. 朗读你写的习题,把每个字符都读出来。有没有发现更多的错误呢?有的话也一样改正过来。
#A comment,this is so you can read your program later.
#Anything after the # is ignored by python.
print "I could have code like this."#and the comment after is ignored
#You can also use a commment to "disable" or comment out a piece of code:
#print "This won't run"
print "This is will run."
---《笨办法学 Python》 (Learn Python The Hard Way,简称 LPTHW) --作者:Zed Shaw---
运行
单行注释用#井号,代码禁用或者他人阅读时作为提示
多行注释用: ''' 内容 '''
例如:
'''
I'd much rather you 'not'.
写写中文舒服多了,就是要切换符号输入
I "said" do not touch this
'''
注意是英文是使用半角符号