print('Marry had a little lamb.')
print("It's fllece wos white as {0}".format("snow"))
print("And everyon that Mary went")
print("."*10)#what 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 ccomma at the end.try removing it to see what hapens
print(end1+end2+end3+end4+end5+end6,end=" ")
print(end7 + end8 + end9 + end10 +end11 +end12)
Pythonista 自动补全引号不注意的话会引起错误。
这些练习确实简单,如果循序渐进,就应该如此。
print是让计算机给自己说自己想让它说的内容。编程不就是让计算机说自己想让它说的话,做想让它做的运算吗?所以练习print一点错没有,反而很有道理。
网友评论