I have this program which calculates the terms in the Fibonacci sequence; once finished the process i intend to evaluate all even-values and add them to an empty list, then sum all the terms in the list. But the only line i get for the sum process is ""
NOTE: There are tabulators after the "for" line and the "if" line
nt=input("Ingrese el numero de terminos:", )
w=1
x=0
y=0
z=1
print w
for i in xrange(2,nt+1):
y=z+x
x=z
z=y
print z
if z%2==0:
list=[]
list=list+[input(z)]
sum(list)
print sum
0, 1, 1, 2, 3, 5, 8, ...or1, 1, 2, 3, 5, 8, .... Your code produces1, 2, 3, 5, 8, ...which is not strictly correct.