'无法分配给运算符'语法错误,Python

时间:2013-09-29 19:45:14

标签: python-3.x syntax-error

import math


def main():  
    loop=eval(input("How many times do you want to run the loop?" ))  
    x=eval(input("What number are you taking the square root of? "))  
    for i in range(loop):  
        x=guess  
        x/2=(guess+(x/guess))/2  
    print(guess)  

main()

1 个答案:

答案 0 :(得分:1)

以下行会导致语法错误:

x/2=(guess+(x/guess))/2 

以下可能是错字?

x = (guess+(x/guess))/2