Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/358.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python3.x“;Return";语句错误 RMS函数_Python_Python 3.x - Fatal编程技术网

Python3.x“;Return";语句错误 RMS函数

Python3.x“;Return";语句错误 RMS函数,python,python-3.x,Python,Python 3.x,以上是我的简单函数代码,但我一直收到语法错误: return total ^ SyntaxError: invalid syntax. 为什么??我很抱歉,如果这是一个简单的解决方案,但请帮助。我正在运行python 3.5。您已经有了不平衡的参数: math.sqrt((float(x)/counter) 应该是 math.sqrt(float(x)/counter) 你错过了一个结束语:math.sqrt((float(x)/counter)你错过了前一行的右括号)。欢迎来到

以上是我的简单函数代码,但我一直收到语法错误:

return total
     ^
SyntaxError: invalid syntax.

为什么??我很抱歉,如果这是一个简单的解决方案,但请帮助。我正在运行python 3.5。

您已经有了不平衡的参数:

math.sqrt((float(x)/counter)
应该是

math.sqrt(float(x)/counter)

你错过了一个结束语:
math.sqrt((float(x)/counter)
你错过了前一行的右括号
。欢迎来到奇妙的计算机科学世界,那里的错误并不是你想象的那样。
math.sqrt(float(x)/counter)