forked from 521xueweihan/python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex7.py
More file actions
33 lines (30 loc) · 750 Bytes
/
ex7.py
File metadata and controls
33 lines (30 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#coding:utf-8
#################
# 习题7:更多打印
#################
# 前言
#
# 巩固练习输出,啦啦啦啦
#
print "Mary had a little lamb"# 羊羔
print "Its fleece was white as %s." % 'snow'
print "And everywhere that Mary went."# 羊毛
# “.”输出了十次
print "." * 10 # what 'd that do?
end1 = "C"
end2 = "h"
end3 = "e"
end4 = "e"
end5 = "s"
end6 = "e"
end7 = "B"
end8 = "u"
end9 = "r"
end10 = "g"
end11 = "e"
end12 = "r"
# watch that comma(逗号) at the end. try removing it to see what happens
# 在下面一行加逗号输出结果:在一行,中间用一个空格隔开
# 不加逗号的结果:分别输出在两行
print end1 + end2 + end3 + end4 + end5 + end6,
print end7 + end8 + end9 + end10 + end11 + end12