圖片發(fā)自簡書App
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一點錯沒有,反而很有道理涌乳。