0
Why am I getting a SyntaxError in line 6?
x = [2, 4] a = 0 b = a + 1 y = 0 while y <= 4000000: x[a] + x[b] = y x.append(y) a += 1
3 Answers
+ 3
At line 6 you are assigning a value to a value ,
2+4=0
which obviously won't work
+ 2
Replace x[a] + x[b] =y with y = x[a] + x[b]