这个哪里错了?显示invalid syntax
File "index.py", line 8 if n = 20: ^ SyntaxError: invalid syntax
sum = 0 x = 1 n = 1 while True: sum=sum+x x=x*2 n = n+1 if n = 20: break print (sum)
不太懂,错误提示是指第八行的‘=’吗?只能用大于吗?
File "index.py", line 8 if n = 20: ^ SyntaxError: invalid syntax
sum = 0 x = 1 n = 1 while True: sum=sum+x x=x*2 n = n+1 if n = 20: break print (sum)
不太懂,错误提示是指第八行的‘=’吗?只能用大于吗?
2019-07-18
举报