-1
RMS功能
def rms(x,counter):
total = math.sqrt((float(x)/counter)
return total
以上是我的一個簡單的函數代碼,但我不斷收到的語法錯誤:Python的3.x的 「返回」 語句錯誤
return total
^
SyntaxError: invalid syntax.
爲什麼?如果這是一個簡單的解決方案,我很抱歉,但請幫助。我正在運行python 3.5。
你缺少一個右括號:'math.sqrt((浮點(X)/計數器)' – Hamms
你'在前面的行上丟失了一個右括號')'。 –
歡迎來到計算機科學的奇妙世界,那裏的錯誤不在您認爲的地方。 – Nico