嗨,我試圖打印這個字符串,但我得到一個錯誤。 我的代碼有什麼問題?如何打印此字符串?
def main():
for x in range (0, 100):
T = 100 - x
print (T+' bottles of beer on the wall,'+T+'bottles of beer.
'Take one down, pass it around,'+T-1+' bottles of beer on the wall.')
main()
的錯誤是:
EOL while scanning the string literal
Rom - 你需要告訴我們你得到的錯誤是什麼。當你閱讀並輸入時,它甚至可能告訴你問題是什麼...... – GreenAsJade
爲什麼你不倒數計算?這樣你就不必減去。 – 1478963
修正了這個問題....爲什麼downvote我? –