笨办法学python习题7 更多打印
2017-11-05 19:24
225 查看
这个习题比较简单,设计到字符串的相加和相乘!话不多说,直接上代码:
print("Mary had a little lamb")
print("Its fleece was white as %s." %'snow')
print("And everwhere that Mary went.")
print("."*10)
end1 = "C"
end2 = "h"
end3 = "e"*2
end4 = "s"
end5 = "e"
print(end1+end2+end3+end4+end5)
运行结果:
mystuff simengred$ python ex7.py
Mary had a little lamb
Its fleece was white as snow.
And everwhere that Mary went.
..........
Cheese
print("Mary had a little lamb")
print("Its fleece was white as %s." %'snow')
print("And everwhere that Mary went.")
print("."*10)
end1 = "C"
end2 = "h"
end3 = "e"*2
end4 = "s"
end5 = "e"
print(end1+end2+end3+end4+end5)
运行结果:
mystuff simengred$ python ex7.py
Mary had a little lamb
Its fleece was white as snow.
And everwhere that Mary went.
..........
Cheese
相关文章推荐
- 笨办法学python习题5 更多的变量和打印
- 习题 5: 更多的变量和打印 | 笨办法学 Python
- 笨办法学python习题5更多的变量和打印
- 笨方法学习Python-习题7:更多打印
- 笨办法学python习题7更多打印
- 笨方法学Python 习题 7: 更多打印
- 笨办法学python习题8:打印,打印,打印
- 【笨办法学Python】习题11:打印出改变了的输入
- 笨办法学python笔记:习题9 打印,打印,打印
- 笨方法学python笔记:习题7 更多打印
- 笨办法学python笔记:习题11 提问(input()函数使用)
- python05 更多的变量和格式化打印
- 笨办法学python习题15 读取文件
- 笨办法学Python-习题37-39
- 笨办法学python加分习题15
- 《笨办法学python(第三版)》习题5
- python中Pycharm 输出中文或打印中文乱码现象的解决办法
- 笨办法05更多的变量和打印
- 习题7 更多打印
- 笨办法学python习题18 命名、变量、代码和函数