您的位置:首页 > 编程语言 > Python开发

《笨办法学python》加分习题1——我的答案

2017-08-03 22:40 375 查看
2018年08月03日,今天开始学习python。同学推荐了《笨办法学python》这本书,所以从今天开始以这本书开始学习python,也会将自己所做的答案给出,相当于复习。在此,感谢这本书的作者:Zed Shaw以及译者的贡献,非常感谢!同时感谢我的同学@xiebin6163。

新手上路,难免翻车!还望前人指路,大家共同交流!

正片:

1、

print "Hello World!"
print "Hello Again"
print "I like typing this"
print "This is fun."
print "Yay! Printing."
print "I'd much rather you 'not'."
print 'I "said" do not touch this.'
print "I can do it!"
2、
print "Hello World!",
print "Hello Again",
print "I like typing this",
print "This is fun.",
print "Yay! Printing.",
print "I'd much rather you 'not'.",
print 'I "said" do not touch this.'一开始不明白作者想表达什么,上网查了答案。如上,在一句后添加“ , ”。类似C语言中表达这句话还没结束的意思吧。
3、

#(octothorpe)
print "Hello World!",
print "Hello Again",
print "I like typing this",
print "This is fun.",
print "Yay! Printing.",
print "I'd much rather you 'not'.",
print 'I "said" do not touch this.'
print 'I can do it'类似C语言中的“//”双斜杠注释的作用,方便程序阅读吧!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: