《笨办法学Python》——习题9

系统:mac os 10.14
Python: 2.7.10
版本:《笨办法学Python》(第四版)

基本习题

1. 完成基本习题

(1) 根据题目,编辑以下内容:

# Here's some new strange stuff, remember type it exactly.

days = "Mon Tue Wed Tue Fri Sat Sun"
months = "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug"

print "Here are the days: ", days
print "Here are the months: ", months

print """
There's something going on here.
With the three double-quotes.
We'll be able to type as much as we like.
Even 4 lines if we want, or 5, or 6.
"""

输出结果如图所示:
《笨办法学Python》——习题9

加分习题

1. 自己检查结果,记录你犯过的错误,并且在下个练习中尽量不犯同样的错误。